home *** CD-ROM | disk | FTP | other *** search
- {*******************************************************}
- { BETA - BETA - BETA - BETA - BETA - BETA - BETA - BETA }
- { }
- { Delphi Runtime Library }
- { DirectX API Interface Unit }
- { DirectDraw, DirectPlay, }
- { DirectSound and Direct3D }
- { }
- { Copyright(c) 1997 Borland International }
- { }
- {*******************************************************}
-
- unit DirectX;
-
- {$ALIGN ON}
- {$MINENUMSIZE 4}
- {$WEAKPACKAGEUNIT}
-
- interface
-
- uses Windows, MMSystem;
-
- (*============================================================================
- *
- * DirectDraw Structures
- *
- * Various structures used to invoke DirectDraw.
- *
- *==========================================================================*)
-
- const
- DD_ROP_SPACE = (256 div 32); // space required to store ROP array
-
- type
- IDirectDraw = interface;
- IDirectDraw2 = interface;
- IDirectDrawSurface = interface;
- IDirectDrawSurface2 = interface;
- IDirectDrawPalette = interface;
- IDirectDrawClipper = interface;
-
-
- TDDCOLORKEY = record
- dwColorSpaceLowValue: DWORD; // low boundary of color space that is to
- // be treated as Color Key, inclusive
- dwColorSpaceHighValue: DWORD; // high boundary of color space that is
- // to be treated as Color Key, inclusive
- end;
- PDDCOLORKEY = ^TDDCOLORKEY;
-
- TDDSCAPS = record
- dwCaps: DWORD; // capabilities of surface wanted
- end;
- PDDSCAPS = ^TDDSCAPS;
-
- TDDCAPS = record
- dwSize: DWORD; // size of the DDDRIVERCAPS structure
- dwCaps: DWORD; // driver specific capabilities
- dwCaps2: DWORD; // more driver specific capabilites
- dwCKeyCaps: DWORD; // color key capabilities of the surface
- dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- dwPalCaps: DWORD; // palette capabilities
- dwSVCaps: DWORD; // stereo vision capabilities
- dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- dwVidMemTotal: DWORD; // total amount of video memory
- dwVidMemFree: DWORD; // amount of free video memory
- dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- dwNumFourCCCodes: DWORD; // number of four cc codes
- dwAlignBoundarySrc: DWORD; // source rectangle alignment
- dwAlignSizeSrc: DWORD; // source rectangle byte size
- dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- dwAlignSizeDest: DWORD; // dest rectangle byte size
- dwAlignStrideAlign: DWORD; // stride alignment
- dwRops: Array [ 0..DD_ROP_SPACE-1 ] of DWORD; // ROPS supported
- ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities
- dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwReserved1: DWORD; // reserved
- dwReserved2: DWORD; // reserved
- dwReserved3: DWORD; // reserved
- dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- dwSVBRops: Array [ 0..DD_ROP_SPACE-1 ] of DWORD;// ROPS supported for System->Vmem blts
- dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- dwVSBRops: Array [ 0..DD_ROP_SPACE-1 ] of DWORD;// ROPS supported for Vmem->System blts
- dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- dwSSBRops: Array [ 0..DD_ROP_SPACE-1 ] of DWORD;// ROPS supported for System->System blts
- dwReserved4: DWORD; // reserved
- dwReserved5: DWORD; // reserved
- dwReserved6: DWORD; // reserved
- end;
- PDDCAPS = ^TDDCAPS;
-
- (*
- * DDPIXELFORMAT
- *)
-
- TDDPIXELFORMAT = record
- dwSize: DWORD; // size of structure
- dwFlags: DWORD; // pixel format flags
- dwFourCC: DWORD; // (FOURCC code)
- case Integer of
- 0: (
- dwRGBBitCount: DWORD; // how many bits per pixel
- dwRBitMask: DWORD; // mask for red bit
- dwGBitMask: DWORD; // mask for green bits
- dwBBitMask: DWORD; // mask for blue bits
- dwRGBAlphaBitMask: DWORD; // mask for alpha channel
- );
- 1: (
- dwYUVBitCount: DWORD; // how many bits per pixel
- dwYBitMask: DWORD; // mask for Y bits
- dwUBitMask: DWORD; // mask for U bits
- dwVBitMask: DWORD; // mask for V bits
- dwYUVAlphaBitMask: DWORD; // mask for alpha channel
- );
- 2: (
- dwZBufferBitDepth: DWORD; // how many bits for z buffers
- );
- 3: (
- dwAlphaBitDepth: DWORD; // how many bits for alpha channels
- );
- end;
- PDDPIXELFORMAT = ^TDDPIXELFORMAT;
-
- (*
- * DDBLTFX
- * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
- *)
-
- TDDBLTFX = record
- dwSize: DWORD; // size of structure
- dwDDFX: DWORD; // FX operations
- dwROP: DWORD; // Win32 raster operations
- dwDDROP: DWORD; // Raster operations new for DirectDraw
- dwRotationAngle: DWORD; // Rotation angle for blt
- dwZBufferOpCode: DWORD; // ZBuffer compares
- dwZBufferLow: DWORD; // Low limit of Z buffer
- dwZBufferHigh: DWORD; // High limit of Z buffer
- dwZBufferBaseDest: DWORD; // Destination base value
- dwZDestConstBitDepth: DWORD; // Bit depth used to specify Z constant for destination
- case Integer of
- 0: (
- dwZDestConst: DWORD; // Constant to use as Z buffer for dest
- dwZSrcConstBitDepth: DWORD; // Bit depth used to specify Z constant for source
- dwZSrcConst: DWORD; // Constant to use as Z buffer for src
- dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend
- dwAlphaEdgeBlend: DWORD; // Alpha for edge blending
- dwReserved: DWORD;
- dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination
- dwAlphaDestConst: DWORD; // Constant to use as Alpha Channel
- dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source
- dwAlphaSrcConst: DWORD; // Constant to use as Alpha Channel
- dwFillColor: DWORD; // color in RGB or Palettized
- ddckDestColorkey: TDDCOLORKEY; // DestColorkey override
- ddckSrcColorkey: TDDCOLORKEY; // SrcColorkey override
- );
- 1: (
- lpDDSZBufferDest: IDirectDrawSurface; // Surface to use as Z buffer for dest
- UNIONFILLER1b: DWORD;
- lpDDSZBufferSrc: IDirectDrawSurface; // Surface to use as Z buffer for src
- UNIONFILLER1d: DWORD;
- UNIONFILLER1e: DWORD;
- UNIONFILLER1f: DWORD;
- UNIONFILLER1g: DWORD;
- lpDDSAlphaDest: IDirectDrawSurface; // Surface to use as Alpha Channel
- UNIONFILLER1i: DWORD;
- lpDDSAlphaSrc: IDirectDrawSurface; // Surface to use as Alpha Channel
- dwFillDepth: DWORD; // depth value for z-buffer
- );
- 2: (
- UNIONFILLER2a: DWORD;
- UNIONFILLER2b: DWORD;
- UNIONFILLER2c: DWORD;
- UNIONFILLER2d: DWORD;
- UNIONFILLER2e: DWORD;
- UNIONFILLER2f: DWORD;
- UNIONFILLER2g: DWORD;
- UNIONFILLER2h: DWORD;
- UNIONFILLER2i: DWORD;
- UNIONFILLER2j: DWORD;
- lpDDSPattern: IDirectDrawSurface; // Surface to use as pattern
- );
- end;
- PDDBLTFX = ^TDDBLTFX;
-
- TDDOVERLAYFX = record
- dwSize: DWORD; // size of structure
- dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend
- dwAlphaEdgeBlend: DWORD; // Constant to use as alpha for edge blend
- dwReserved: DWORD;
- dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination
- case Integer of
- 0: (
- dwAlphaDestConst: DWORD; // Constant to use as alpha channel for dest
- dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source
- dwAlphaSrcConst: DWORD; // Constant to use as alpha channel for src
- dckDestColorkey: TDDCOLORKEY; // DestColorkey override
- dckSrcColorkey: TDDCOLORKEY; // DestColorkey override
- dwDDFX: DWORD; // Overlay FX
- dwFlags: DWORD; // flags
- );
- 1: (
- lpDDSAlphaDest: IDirectDrawSurface; // Surface to use as alpha channel for dest
- UNIONFILLER1b: DWORD;
- lpDDSAlphaSrc: IDirectDrawSurface; // Surface to use as alpha channel for src
- );
- end;
- PDDOVERLAYFX = ^TDDOVERLAYFX;
-
- (*
- * DDBLTBATCH: BltBatch entry structure
- *)
-
- TDDBLTBATCH = record
- lprDest: PRect;
- lpDDSSrc: IDirectDrawSurface;
- lprSrc: PRect;
- dwFlags: DWORD;
- lpDDBltFx: PDDBLTFX;
- end;
- PDDBLTBATCH = ^TDDBLTBATCH;
-
- (*
- * DDSURFACEDESC
- *)
-
- TDDSURFACEDESC = record
- dwSize: DWORD; // size of the DDSURFACEDESC structure
- dwFlags: DWORD; // determines what fields are valid
- dwHeight: DWORD; // height of surface to be created
- dwWidth: DWORD; // width of input surface
- lPitch: LongInt; // distance to start of next line (return value only)
- dwBackBufferCount: DWORD; // number of back buffers requested
- case Integer of
- 0: (
- dwMipMapCount: DWORD; // number of mip-map levels requested
- dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
- dwReserved: DWORD; // reserved
- lpSurface: Pointer; // pointer to the associated surface memory
- ddckCKDestOverlay: TDDCOLORKEY; // color key for destination overlay use
- ddckCKDestBlt: TDDCOLORKEY; // color key for destination blt use
- ddckCKSrcOverlay: TDDCOLORKEY; // color key for source overlay use
- ddckCKSrcBlt: TDDCOLORKEY; // color key for source blt use
- ddpfPixelFormat: TDDPIXELFORMAT; // pixel format description of the surface
- ddsCaps: TDDSCAPS; // direct draw surface capabilities
- );
- 1: (
- dwZBufferBitDepth: DWORD; // depth of Z buffer requested
- );
- 2: (
- dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
- );
- end;
- PDDSURFACEDESC = ^TDDSURFACEDESC;
-
- TCLIPPERCALLBACK = function (const DDClipper: IDirectDrawClipper; hWnd: HWND;
- code: DWORD; lpContext: Pointer): DWORD; stdcall;
-
- TDDENUMMODESCALLBACK = function (const lpDDSurfaceDesc: TDDSURFACEDESC;
- lpContext: Pointer): HRESULT; stdcall;
- TDDENUMSURFACESCALLBACK = function (const DDSurface: IDirectDrawSurface;
- const lpDDSurfaceDesc: TDDSURFACEDESC; lpContext: Pointer): HRESULT;
- stdcall;
-
- (*
- * IDirectDraw
- *)
-
- IDirectDraw = interface (IUnknown)
- ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
- function Compact: HRESULT; stdcall;
- function CreateClipper (dwFlags: DWORD; out DDClipper: IDirectDrawClipper;
- const pUnkOuter: IUnknown): HRESULT; stdcall;
- function CreatePalette (dwFlags: DWORD; lpColorTable: PPaletteEntry;
- out DDPalette: IDirectDrawPalette;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- function CreateSurface (const lpDDSurfaceDesc: TDDSURFACEDESC;
- out DDSurface: IDirectDrawSurface;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- function DuplicateSurface (const DDSurface: IDirectDrawSurface;
- out DupDDSurface: IDirectDrawSurface): HRESULT; stdcall;
- function EnumDisplayModes (dwFlags: DWORD;
- lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: Pointer;
- lpEnumModesCallback: TDDENUMMODESCALLBACK): HRESULT; stdcall;
- function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSURFACEDESC;
- lpContext: Pointer;
- lpEnumCallback: TDDENUMSURFACESCALLBACK):HRESULT; stdcall;
- function FlipToGDISurface: HRESULT; stdcall;
- function GetCaps (var lpDDDriverCaps: TDDCAPS;
- var lpDDHELCaps: TDDCAPS): HRESULT; stdcall;
- function GetDisplayMode (var lpDDSurfaceDesc: TDDSURFACEDESC): HRESULT;
- stdcall;
- function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: Pointer): HRESULT;
- stdcall;
- function GetGDISurface (out GDIDDSSurface: IDirectDrawSurface): HRESULT;
- stdcall;
- function GetMonitorFrequency (var lpdwFrequency: DWORD): HRESULT;
- stdcall;
- function GetScanLine (var lpdwScanLine: DWORD): HRESULT; stdcall;
- function GetVerticalBlankStatus (var lpbIsInVB: BOOL): HRESULT; stdcall;
- function Initialize (const GUID: TGUID): HRESULT; stdcall;
- function RestoreDisplayMode: HRESULT; stdcall;
- function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD): HRESULT;
- stdcall;
- (*** Warning! IDirectDraw.SetDisplayMode <> IDirectDraw2.SetDisplayMode ***)
- function SetDisplayMode (dwWidth, dwHeight, dwBpp: DWORD): HRESULT; stdcall;
- function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle): HRESULT;
- stdcall;
- end;
-
- IDirectDraw2 = interface (IUnknown)
- ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
- function Compact: HRESULT; stdcall;
- function CreateClipper (dwFlags: DWORD; out DDClipper: IDirectDrawClipper;
- const pUnkOuter: IUnknown): HRESULT; stdcall;
- function CreatePalette (dwFlags: DWORD; lpColorTable: PPaletteEntry;
- out DDPalette: IDirectDrawPalette;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- function CreateSurface (const lpDDSurfaceDesc: TDDSURFACEDESC;
- out DDSurface: IDirectDrawSurface;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- function DuplicateSurface (const DDSurface: IDirectDrawSurface;
- out DupDDSurface: IDirectDrawSurface): HRESULT; stdcall;
- function EnumDisplayModes (dwFlags: DWORD;
- lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: Pointer;
- lpEnumModesCallback: TDDENUMMODESCALLBACK): HRESULT; stdcall;
- function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSURFACEDESC;
- lpContext: Pointer;
- lpEnumCallback: TDDENUMSURFACESCALLBACK):HRESULT; stdcall;
- function FlipToGDISurface: HRESULT; stdcall;
- function GetCaps (var lpDDDriverCaps: TDDCAPS;
- var lpDDHELCaps: TDDCAPS): HRESULT; stdcall;
- function GetDisplayMode (var lpDDSurfaceDesc: TDDSURFACEDESC): HRESULT;
- stdcall;
- function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: Pointer): HRESULT;
- stdcall;
- function GetGDISurface (out GDIDDSSurface: IDirectDrawSurface): HRESULT;
- stdcall;
- function GetMonitorFrequency (var lpdwFrequency: DWORD): HRESULT;
- stdcall;
- function GetScanLine (var lpdwScanLine: DWORD): HRESULT; stdcall;
- function GetVerticalBlankStatus (var lpbIsInVB: BOOL): HRESULT; stdcall;
- function Initialize (const GUID: TGUID): HRESULT; stdcall;
- function RestoreDisplayMode: HRESULT; stdcall;
- function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD): HRESULT;
- stdcall;
- (*** Warning! SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
- function SetDisplayMode (dwWidth, dwHeight, dwBPP, dwRefreshRate,
- dwFlags: DWORD): HRESULT; stdcall;
- function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle): HRESULT;
- stdcall;
- function GetAvailableVidMem (var lpDDSCaps: TDDSCAPS;
- var lpdwTotal, lpdwFree: DWORD): HRESULT; stdcall;
- end;
-
- (*
- * IDirectDrawPalette
- *)
-
- IDirectDrawPalette = interface (IUnknown)
- ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
- function GetCaps (var lpdwCaps: DWORD): HRESULT; stdcall;
- function GetEntries (dwFlags, dwBase, dwNumEntries: DWORD;
- lpEntries: PPaletteEntry): HRESULT; stdcall;
- function Initialize (const DD: IDirectDraw; dwFlags: DWORD;
- lpDDColorTable: PPaletteEntry): HRESULT; stdcall;
- function SetEntries (dwFlags, dwStartingEntry, dwCount: DWORD;
- lpEntries: PPaletteEntry): HRESULT; stdcall;
- end;
-
- (*
- * IDirectDrawClipper
- *)
-
- IDirectDrawClipper = interface (IUnknown)
- ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
- function GetClipList (const lpRect: TRect; lpClipList: PRgnData;
- var lpdwSize: DWORD): HRESULT; stdcall;
- function GetHWnd (var lphWnd: HWND): HRESULT; stdcall;
- function Initialize (const DD: IDirectDraw; dwFlags: DWORD): HRESULT;
- stdcall;
- function IsClipListChanged (var lpbChanged: BOOL): HRESULT; stdcall;
- function SetClipList (lpClipList: PRgnData; dwFlags: DWORD): HRESULT;
- stdcall;
- function SetHWnd (dwFlags: DWORD; hWnd: HWND): HRESULT; stdcall;
- end;
-
- (*
- * IDirectDrawSurface
- *)
-
- IDirectDrawSurface = interface (IUnknown)
- ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
- function AddAttachedSurface (
- const DDSAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
- function AddOverlayDirtyRect (const lpRect: TRect): HRESULT; stdcall;
- function Blt (const lpDestRect: TRect;
- const DDSrcSurface: IDirectDrawSurface; const lpSrcRect: TRect;
- dwFlags: DWORD; const lpDDBltFx: TDDBLTFX): HRESULT; stdcall;
- function BltBatch (const lpDDBltBatch: TDDBLTBATCH; dwCount: DWORD;
- dwFlags: DWORD): HRESULT; stdcall;
- function BltFast (dwX: DWORD; dwY: DWORD;
- const DDSrcSurface: IDirectDrawSurface; const lpSrcRect: TRect;
- dwTrans: DWORD): HRESULT; stdcall;
- function DeleteAttachedSurface (dwFlags: DWORD;
- const DDSAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
- function EnumAttachedSurfaces (lpContext: Pointer;
- lpEnumSurfacesCallback: TDDENUMSURFACESCALLBACK): HRESULT; stdcall;
- function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
- lpfnCallback: TDDENUMSURFACESCALLBACK): HRESULT; stdcall;
- function Flip (const DDSurfaceTargetOverride: IDirectDrawSurface;
- dwFlags: DWORD): HRESULT; stdcall;
- function GetAttachedSurface (var lpDDSCaps: TDDSCAPS;
- out DDAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
- function GetBltStatus (dwFlags: DWORD): HRESULT; stdcall;
- function GetCaps (var lpDDSCaps: TDDSCAPS): HRESULT; stdcall;
- function GetClipper (out DDClipper: IDirectDrawClipper): HRESULT;
- stdcall;
- function GetColorKey (dwFlags: DWORD;
- var lpDDColorKey: TDDCOLORKEY): HRESULT; stdcall;
- function GetDC (var lphDC: HDC): HRESULT; stdcall;
- function GetFlipStatus (dwFlags: DWORD): HRESULT; stdcall;
- function GetOverlayPosition (var lplX, lplY: LongInt): HRESULT; stdcall;
- function GetPalette (out DDPalette: IDirectDrawPalette): HRESULT;
- stdcall;
- function GetPixelFormat (var lpDDPixelFormat: TDDPIXELFORMAT): HRESULT;
- stdcall;
- function GetSurfaceDesc (var lpDDSurfaceDesc: TDDSURFACEDESC): HRESULT;
- stdcall;
- function Initialize (const DD: IDirectDraw;
- const lpDDSurfaceDesc: TDDSURFACEDESC): HRESULT; stdcall;
- function IsLost: HRESULT; stdcall;
- function Lock (lpDestRect: PRect;
- var lpDDSurfaceDesc: TDDSURFACEDESC; dwFlags: DWORD;
- hEvent: THandle): HRESULT; stdcall;
- function ReleaseDC (hDC: HDC): HRESULT; stdcall;
- function Restore: HRESULT; stdcall;
- function SetClipper (const DDClipper: IDirectDrawClipper): HRESULT; stdcall;
- function SetColorKey (dwFlags: DWORD;
- const lpDDColorKey: TDDCOLORKEY): HRESULT; stdcall;
- function SetOverlayPosition (lX, lY: LongInt): HRESULT; stdcall;
- function SetPalette (const DDPalette: IDirectDrawPalette): HRESULT; stdcall;
- function Unlock (lpSurfaceData: Pointer): HRESULT; stdcall;
- function UpdateOverlay (const lpSrcRect: TRect;
- const lpDDDestSurface: IDirectDrawSurface; const lpDestRect: TRect;
- dwFlags: DWORD; const lpDDOverlayFx: TDDOVERLAYFX): HRESULT; stdcall;
- function UpdateOverlayDisplay (dwFlags: DWORD): HRESULT; stdcall;
- function UpdateOverlayZOrder (dwFlags: DWORD;
- const DDSReference: IDirectDrawSurface): HRESULT; stdcall;
- end;
-
- (*
- * IDirectDrawSurface2
- *)
-
- IDirectDrawSurface2 = interface (IUnknown)
- ['{57805885-6eec-11cf-9441-a82303c10e27}']
- function AddAttachedSurface (
- const DDSAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
- function AddOverlayDirtyRect (const lpRect: TRect): HRESULT; stdcall;
- function Blt (const lpDestRect: TRect;
- const DDSrcSurface: IDirectDrawSurface; const lpSrcRect: TRect;
- dwFlags: DWORD; const lpDDBltFx: TDDBLTFX): HRESULT; stdcall;
- function BltBatch (const lpDDBltBatch: TDDBLTBATCH; dwCount: DWORD;
- dwFlags: DWORD): HRESULT; stdcall;
- function BltFast (dwX: DWORD; dwY: DWORD;
- const DDSrcSurface: IDirectDrawSurface; const lpSrcRect: TRect;
- dwTrans: DWORD): HRESULT; stdcall;
- function DeleteAttachedSurface (dwFlags: DWORD;
- const DDSAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
- function EnumAttachedSurfaces (lpContext: Pointer;
- lpEnumSurfacesCallback: TDDENUMSURFACESCALLBACK): HRESULT; stdcall;
- function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
- lpfnCallback: TDDENUMSURFACESCALLBACK): HRESULT; stdcall;
- function Flip (const DDSurfaceTargetOverride: IDirectDrawSurface;
- dwFlags: DWORD): HRESULT; stdcall;
- function GetAttachedSurface (var lpDDSCaps: TDDSCAPS;
- out DDAttachedSurface: IDirectDrawSurface): HRESULT; stdcall;
- function GetBltStatus (dwFlags: DWORD): HRESULT; stdcall;
- function GetCaps (var lpDDSCaps: TDDSCAPS): HRESULT; stdcall;
- function GetClipper (out DDClipper: IDirectDrawClipper): HRESULT;
- stdcall;
- function GetColorKey (dwFlags: DWORD;
- var lpDDColorKey: TDDCOLORKEY): HRESULT; stdcall;
- function GetDC (var lphDC: HDC): HRESULT; stdcall;
- function GetFlipStatus (dwFlags: DWORD): HRESULT; stdcall;
- function GetOverlayPosition (var lplX, lplY: LongInt): HRESULT; stdcall;
- function GetPalette (out DDPalette: IDirectDrawPalette): HRESULT;
- stdcall;
- function GetPixelFormat (var lpDDPixelFormat: TDDPIXELFORMAT): HRESULT;
- stdcall;
- function GetSurfaceDesc (var lpDDSurfaceDesc: TDDSURFACEDESC): HRESULT;
- stdcall;
- function Initialize (const DD: IDirectDraw;
- const lpDDSurfaceDesc: TDDSURFACEDESC): HRESULT; stdcall;
- function IsLost: HRESULT; stdcall;
- function Lock (lpDestRect: PRect;
- var lpDDSurfaceDesc: TDDSURFACEDESC; dwFlags: DWORD;
- hEvent: THandle): HRESULT; stdcall;
- function ReleaseDC (hDC: HDC): HRESULT; stdcall;
- function Restore: HRESULT; stdcall;
- function SetClipper (const DDClipper: IDirectDrawClipper): HRESULT; stdcall;
- function SetColorKey (dwFlags: DWORD;
- const lpDDColorKey: TDDCOLORKEY): HRESULT; stdcall;
- function SetOverlayPosition (lX, lY: LongInt): HRESULT; stdcall;
- function SetPalette (const DDPalette: IDirectDrawPalette): HRESULT; stdcall;
- function Unlock (lpSurfaceData: Pointer): HRESULT; stdcall;
- function UpdateOverlay (const lpSrcRect: TRect;
- const lpDDDestSurface: IDirectDrawSurface; const lpDestRect: TRect;
- dwFlags: DWORD; const lpDDOverlayFx: TDDOVERLAYFX): HRESULT; stdcall;
- function UpdateOverlayDisplay (dwFlags: DWORD): HRESULT; stdcall;
- function UpdateOverlayZOrder (dwFlags: DWORD;
- const DDSReference: IDirectDrawSurface): HRESULT; stdcall;
- (*** Added in the v2 interface ***)
- function GetDDInterface (out DD: IDirectDraw): HRESULT; stdcall;
- function PageLock (dwFlags: DWORD): HRESULT; stdcall;
- function PageUnlock (dwFlags: DWORD): HRESULT; stdcall;
- end;
-
- const
-
- (*
- * ddsCaps field is valid.
- *)
-
- DDSD_CAPS = $00000001; // default
-
- (*
- * dwHeight field is valid.
- *)
-
- DDSD_HEIGHT = $00000002;
-
- (*
- * dwWidth field is valid.
- *)
-
- DDSD_WIDTH = $00000004;
-
- (*
- * lPitch is valid.
- *)
-
- DDSD_PITCH = $00000008;
-
- (*
- * dwBackBufferCount is valid.
- *)
-
- DDSD_BACKBUFFERCOUNT = $00000020;
-
- (*
- * dwZBufferBitDepth is valid.
- *)
-
- DDSD_ZBUFFERBITDEPTH = $00000040;
-
- (*
- * dwAlphaBitDepth is valid.
- *)
-
- DDSD_ALPHABITDEPTH = $00000080;
-
-
-
- (*
- * ddpfPixelFormat is valid.
- *)
-
- DDSD_PIXELFORMAT = $00001000;
-
- (*
- * ddckCKDestOverlay is valid.
- *)
-
- DDSD_CKDESTOVERLAY = $00002000;
-
- (*
- * ddckCKDestBlt is valid.
- *)
-
- DDSD_CKDESTBLT = $00004000;
-
- (*
- * ddckCKSrcOverlay is valid.
- *)
-
- DDSD_CKSRCOVERLAY = $00008000;
-
- (*
- * ddckCKSrcBlt is valid.
- *)
-
- DDSD_CKSRCBLT = $00010000;
-
- (*
- * dwMipMapCount is valid.
- *)
-
- DDSD_MIPMAPCOUNT = $00020000;
-
- (*
- * dwRefreshRate is valid
- *)
-
- DDSD_REFRESHRATE = $00040000;
-
-
- (*
- * All input fields are valid.
- *)
-
- DDSD_ALL = $0007f9ee;
-
-
- (*============================================================================
- *
- * Direct Draw Capability Flags
- *
- * These flags are used to describe the capabilities of a given Surface.
- * All flags are bit flags.
- *
- *==========================================================================*)
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE CAPABILITY FLAGS
- *
- ****************************************************************************)
- (*
- * This bit currently has no meaning.
- *)
-
- DDSCAPS_3D = $00000001;
-
- (*
- * Indicates that this surface contains alpha information. The pixel
- * format must be interrogated to determine whether this surface
- * contains only alpha information or alpha information interlaced
- * with pixel color data (e.g. RGBA or YUVA).
- *)
-
- DDSCAPS_ALPHA = $00000002;
-
- (*
- * Indicates that this surface is a backbuffer. It is generally
- * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
- * It indicates that this surface is THE back buffer of a surface
- * flipping structure. DirectDraw supports N surfaces in a
- * surface flipping structure. Only the surface that immediately
- * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
- * The other surfaces are identified as back buffers by the presence
- * of the DDSCAPS_FLIP capability, their attachment order, and the
- * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
- * capabilities. The bit is sent to CreateSurface when a standalone
- * back buffer is being created. This surface could be attached to
- * a front buffer and/or back buffers to form a flipping surface
- * structure after the CreateSurface call. See AddAttachments for
- * a detailed description of the behaviors in this case.
- *)
-
- DDSCAPS_BACKBUFFER = $00000004;
-
- (*
- * Indicates a complex surface structure is being described. A
- * complex surface structure results in the creation of more than
- * one surface. The additional surfaces are attached to the root
- * surface. The complex structure can only be destroyed by
- * destroying the root.
- *)
-
- DDSCAPS_COMPLEX = $00000008;
-
- (*
- * Indicates that this surface is a part of a surface flipping structure.
- * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
- * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
- * on the resulting creations. The dwBackBufferCount field in the
- * DDSURFACEDESC structure must be set to at least 1 in order for
- * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
- * must always be set with creating multiple surfaces through CreateSurface.
- *)
-
- DDSCAPS_FLIP = $00000010;
-
- (*
- * Indicates that this surface is THE front buffer of a surface flipping
- * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
- * capability bit is set.
- * If this capability is sent to CreateSurface then a standalonw front buffer
- * is created. This surface will not have the DDSCAPS_FLIP capability.
- * It can be attached to other back buffers to form a flipping structure.
- * See AddAttachments for a detailed description of the behaviors in this
- * case.
- *)
-
- DDSCAPS_FRONTBUFFER = $00000020;
-
- (*
- * Indicates that this surface is any offscreen surface that is not an overlay,
- * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
- * to identify plain vanilla surfaces.
- *)
-
- DDSCAPS_OFFSCREENPLAIN = $00000040;
-
- (*
- * Indicates that this surface is an overlay. It may or may not be directly visible
- * depending on whether or not it is currently being overlayed onto the primary
- * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
- * overlayed at the moment.
- *)
-
- DDSCAPS_OVERLAY = $00000080;
-
- (*
- * Indicates that unique DirectDrawPalette objects can be created and
- * attached to this surface.
- *)
-
- DDSCAPS_PALETTE = $00000100;
-
- (*
- * Indicates that this surface is the primary surface. The primary
- * surface represents what the user is seeing at the moment.
- *)
-
- DDSCAPS_PRIMARYSURFACE = $00000200;
-
- (*
- * Indicates that this surface is the primary surface for the left eye.
- * The primary surface for the left eye represents what the user is seeing
- * at the moment with the users left eye. When this surface is created the
- * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
- * right eye.
- *)
-
- DDSCAPS_PRIMARYSURFACELEFT = $00000400;
-
- (*
- * Indicates that this surface memory was allocated in system memory
- *)
-
- DDSCAPS_SYSTEMMEMORY = $00000800;
-
- (*
- * Indicates that this surface can be used as a 3D texture. It does not
- * indicate whether or not the surface is being used for that purpose.
- *)
-
- DDSCAPS_TEXTURE = $00001000;
-
- (*
- * Indicates that a surface may be a destination for 3D rendering. This
- * bit must be set in order to query for a Direct3D Device Interface
- * from this surface.
- *)
-
- DDSCAPS_3DDEVICE = $00002000;
-
- (*
- * Indicates that this surface exists in video memory.
- *)
-
- DDSCAPS_VIDEOMEMORY = $00004000;
-
- (*
- * Indicates that changes made to this surface are immediately visible.
- * It is always set for the primary surface and is set for overlays while
- * they are being overlayed and texture maps while they are being textured.
- *)
-
- DDSCAPS_VISIBLE = $00008000;
-
- (*
- * Indicates that only writes are permitted to the surface. Read accesses
- * from the surface may or may not generate a protection fault, but the
- * results of a read from this surface will not be meaningful. READ ONLY.
- *)
-
- DDSCAPS_WRITEONLY = $00010000;
-
- (*
- * Indicates that this surface is a z buffer. A z buffer does not contain
- * displayable information. Instead it contains bit depth information that is
- * used to determine which pixels are visible and which are obscured.
- *)
-
- DDSCAPS_ZBUFFER = $00020000;
-
- (*
- * Indicates surface will have a DC associated long term
- *)
-
- DDSCAPS_OWNDC = $00040000;
-
- (*
- * Indicates surface should be able to receive live video
- *)
-
- DDSCAPS_LIVEVIDEO = $00080000;
-
- (*
- * Indicates surface should be able to have a stream decompressed
- * to it by the hardware.
- *)
-
- DDSCAPS_HWCODEC = $00100000;
-
- (*
- * Surface is a 320x200 or 320x240 ModeX surface
- *)
-
- DDSCAPS_MODEX = $00200000;
-
- (*
- * Indicates surface is one level of a mip-map. This surface will
- * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
- * This can be done explicitly, by creating a number of surfaces and
- * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
- * If this bit is set then DDSCAPS_TEXTURE must also be set.
- *)
-
- DDSCAPS_MIPMAP = $00400000;
-
-
-
- (*
- * Indicates that memory for the surface is not allocated until the surface
- * is loaded (via the Direct3D texture Load() function).
- *)
-
- DDSCAPS_ALLOCONLOAD = $04000000;
-
-
-
- (****************************************************************************
- *
- * DIRECTDRAW DRIVER CAPABILITY FLAGS
- *
- ****************************************************************************)
-
- (*
- * Display hardware has 3D acceleration.
- *)
-
- DDCAPS_3D = $00000001;
-
- (*
- * Indicates that DirectDraw will support only dest rectangles that are aligned
- * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
- * READ ONLY.
- *)
-
- DDCAPS_ALIGNBOUNDARYDEST = $00000002;
-
- (*
- * Indicates that DirectDraw will support only source rectangles whose sizes in
- * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
- *)
-
- DDCAPS_ALIGNSIZEDEST = $00000004;
- (*
- * Indicates that DirectDraw will support only source rectangles that are aligned
- * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
- * READ ONLY.
- *)
-
- DDCAPS_ALIGNBOUNDARYSRC = $00000008;
-
- (*
- * Indicates that DirectDraw will support only source rectangles whose sizes in
- * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
- *)
-
- DDCAPS_ALIGNSIZESRC = $00000010;
-
- (*
- * Indicates that DirectDraw will create video memory surfaces that have a stride
- * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
- *)
-
- DDCAPS_ALIGNSTRIDE = $00000020;
-
- (*
- * Display hardware is capable of blt operations.
- *)
-
- DDCAPS_BLT = $00000040;
-
- (*
- * Display hardware is capable of asynchronous blt operations.
- *)
-
- DDCAPS_BLTQUEUE = $00000080;
-
- (*
- * Display hardware is capable of color space conversions during the blt operation.
- *)
-
- DDCAPS_BLTFOURCC = $00000100;
-
- (*
- * Display hardware is capable of stretching during blt operations.
- *)
-
- DDCAPS_BLTSTRETCH = $00000200;
-
- (*
- * Display hardware is shared with GDI.
- *)
-
- DDCAPS_GDI = $00000400;
-
- (*
- * Display hardware can overlay.
- *)
-
- DDCAPS_OVERLAY = $00000800;
-
- (*
- * Set if display hardware supports overlays but can not clip them.
- *)
-
- DDCAPS_OVERLAYCANTCLIP = $00001000;
-
- (*
- * Indicates that overlay hardware is capable of color space conversions during
- * the overlay operation.
- *)
-
- DDCAPS_OVERLAYFOURCC = $00002000;
-
- (*
- * Indicates that stretching can be done by the overlay hardware.
- *)
-
- DDCAPS_OVERLAYSTRETCH = $00004000;
-
- (*
- * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
- * other than the primary surface.
- *)
-
- DDCAPS_PALETTE = $00008000;
-
- (*
- * Indicates that palette changes can be syncd with the veritcal refresh.
- *)
-
- DDCAPS_PALETTEVSYNC = $00010000;
-
- (*
- * Display hardware can return the current scan line.
- *)
-
- DDCAPS_READSCANLINE = $00020000;
-
- (*
- * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
- * can be created.
- *)
-
- DDCAPS_STEREOVIEW = $00040000;
-
- (*
- * Display hardware is capable of generating a vertical blank interrupt.
- *)
-
- DDCAPS_VBI = $00080000;
-
- (*
- * Supports the use of z buffers with blt operations.
- *)
-
- DDCAPS_ZBLTS = $00100000;
-
- (*
- * Supports Z Ordering of overlays.
- *)
-
- DDCAPS_ZOVERLAYS = $00200000;
-
- (*
- * Supports color key
- *)
-
- DDCAPS_COLORKEY = $00400000;
-
- (*
- * Supports alpha surfaces
- *)
-
- DDCAPS_ALPHA = $00800000;
-
- (*
- * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
- *)
-
- DDCAPS_COLORKEYHWASSIST = $01000000;
-
- (*
- * no hardware support at all
- *)
-
- DDCAPS_NOHARDWARE = $02000000;
-
- (*
- * Display hardware is capable of color fill with bltter
- *)
-
- DDCAPS_BLTCOLORFILL = $04000000;
-
- (*
- * Display hardware is bank switched, and potentially very slow at
- * random access to VRAM.
- *)
-
- DDCAPS_BANKSWITCHED = $08000000;
-
- (*
- * Display hardware is capable of depth filling Z-buffers with bltter
- *)
-
- DDCAPS_BLTDEPTHFILL = $10000000;
-
- (*
- * Display hardware is capable of clipping while bltting.
- *)
-
- DDCAPS_CANCLIP = $20000000;
-
- (*
- * Display hardware is capable of clipping while stretch bltting.
- *)
-
- DDCAPS_CANCLIPSTRETCHED = $40000000;
-
- (*
- * Display hardware is capable of bltting to or from system memory
- *)
-
- DDCAPS_CANBLTSYSMEM = $80000000;
-
-
- (****************************************************************************
- *
- * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
- *
- ****************************************************************************)
-
- (*
- * Display hardware is certified
- *)
-
- DDCAPS2_CERTIFIED = $00000001;
-
- (*
- * Driver cannot interleave 2D operations (lock and blt) to surfaces with
- * Direct3D rendering operations between calls to BeginScene() and EndScene()
- *)
-
- DDCAPS2_NO2DDURING3DSCENE = $00000002;
-
- (****************************************************************************
- *
- * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
- *
- ****************************************************************************)
-
- (*
- * Supports alpha blending around the edge of a source color keyed surface.
- * For Blt.
- *)
-
- DDFXALPHACAPS_BLTALPHAEDGEBLEND = $00000001;
-
- (*
- * Supports alpha information in the pixel format. The bit depth of alpha
- * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
- * more opaque as the alpha value increases. (0 is transparent.)
- * For Blt.
- *)
-
- DDFXALPHACAPS_BLTALPHAPIXELS = $00000002;
-
- (*
- * Supports alpha information in the pixel format. The bit depth of alpha
- * information in the pixel format can be 1,2,4, or 8. The alpha value
- * becomes more transparent as the alpha value increases. (0 is opaque.)
- * This flag can only be set if DDCAPS_ALPHA is set.
- * For Blt.
- *)
-
- DDFXALPHACAPS_BLTALPHAPIXELSNEG = $00000004;
-
- (*
- * Supports alpha only surfaces. The bit depth of an alpha only surface can be
- * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
- * (0 is transparent.)
- * For Blt.
- *)
-
- DDFXALPHACAPS_BLTALPHASURFACES = $00000008;
-
- (*
- * The depth of the alpha channel data can range can be 1,2,4, or 8.
- * The NEG suffix indicates that this alpha channel becomes more transparent
- * as the alpha value increases. (0 is opaque.) This flag can only be set if
- * DDCAPS_ALPHA is set.
- * For Blt.
- *)
-
- DDFXALPHACAPS_BLTALPHASURFACESNEG = $00000010;
-
- (*
- * Supports alpha blending around the edge of a source color keyed surface.
- * For Overlays.
- *)
-
- DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND = $00000020;
-
- (*
- * Supports alpha information in the pixel format. The bit depth of alpha
- * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
- * more opaque as the alpha value increases. (0 is transparent.)
- * For Overlays.
- *)
-
- DDFXALPHACAPS_OVERLAYALPHAPIXELS = $00000040;
-
- (*
- * Supports alpha information in the pixel format. The bit depth of alpha
- * information in the pixel format can be 1,2,4, or 8. The alpha value
- * becomes more transparent as the alpha value increases. (0 is opaque.)
- * This flag can only be set if DDCAPS_ALPHA is set.
- * For Overlays.
- *)
-
- DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG = $00000080;
-
- (*
- * Supports alpha only surfaces. The bit depth of an alpha only surface can be
- * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
- * (0 is transparent.)
- * For Overlays.
- *)
-
- DDFXALPHACAPS_OVERLAYALPHASURFACES = $00000100;
-
- (*
- * The depth of the alpha channel data can range can be 1,2,4, or 8.
- * The NEG suffix indicates that this alpha channel becomes more transparent
- * as the alpha value increases. (0 is opaque.) This flag can only be set if
- * DDCAPS_ALPHA is set.
- * For Overlays.
- *)
-
- DDFXALPHACAPS_OVERLAYALPHASURFACESNEG = $00000200;
-
- (****************************************************************************
- *
- * DIRECTDRAW FX CAPABILITY FLAGS
- *
- ****************************************************************************)
-
- (*
- * Uses arithmetic operations to stretch and shrink surfaces during blt
- * rather than pixel doubling techniques. Along the Y axis.
- *)
-
- DDFXCAPS_BLTARITHSTRETCHY = $00000020;
-
- (*
- * Uses arithmetic operations to stretch during blt
- * rather than pixel doubling techniques. Along the Y axis. Only
- * works for x1, x2, etc.
- *)
-
- DDFXCAPS_BLTARITHSTRETCHYN = $00000010;
-
- (*
- * Supports mirroring left to right in blt.
- *)
-
- DDFXCAPS_BLTMIRRORLEFTRIGHT = $00000040;
-
- (*
- * Supports mirroring top to bottom in blt.
- *)
-
- DDFXCAPS_BLTMIRRORUPDOWN = $00000080;
-
- (*
- * Supports arbitrary rotation for blts.
- *)
-
- DDFXCAPS_BLTROTATION = $00000100;
-
- (*
- * Supports 90 degree rotations for blts.
- *)
-
- DDFXCAPS_BLTROTATION90 = $00000200;
-
- (*
- * DirectDraw supports arbitrary shrinking of a surface along the
- * x axis (horizontal direction) for blts.
- *)
-
- DDFXCAPS_BLTSHRINKX = $00000400;
-
- (*
- * DirectDraw supports integer shrinking (1x,2x,) of a surface
- * along the x axis (horizontal direction) for blts.
- *)
-
- DDFXCAPS_BLTSHRINKXN = $00000800;
-
- (*
- * DirectDraw supports arbitrary shrinking of a surface along the
- * y axis (horizontal direction) for blts.
- *)
-
- DDFXCAPS_BLTSHRINKY = $00001000;
-
- (*
- * DirectDraw supports integer shrinking (1x,2x,) of a surface
- * along the y axis (vertical direction) for blts.
- *)
-
- DDFXCAPS_BLTSHRINKYN = $00002000;
-
- (*
- * DirectDraw supports arbitrary stretching of a surface along the
- * x axis (horizontal direction) for blts.
- *)
-
- DDFXCAPS_BLTSTRETCHX = $00004000;
-
- (*
- * DirectDraw supports integer stretching (1x,2x,) of a surface
- * along the x axis (horizontal direction) for blts.
- *)
-
- DDFXCAPS_BLTSTRETCHXN = $00008000;
-
- (*
- * DirectDraw supports arbitrary stretching of a surface along the
- * y axis (horizontal direction) for blts.
- *)
-
- DDFXCAPS_BLTSTRETCHY = $00010000;
-
- (*
- * DirectDraw supports integer stretching (1x,2x,) of a surface
- * along the y axis (vertical direction) for blts.
- *)
-
- DDFXCAPS_BLTSTRETCHYN = $00020000;
-
- (*
- * Uses arithmetic operations to stretch and shrink surfaces during
- * overlay rather than pixel doubling techniques. Along the Y axis
- * for overlays.
- *)
-
- DDFXCAPS_OVERLAYARITHSTRETCHY = $00040000;
-
- (*
- * Uses arithmetic operations to stretch surfaces during
- * overlay rather than pixel doubling techniques. Along the Y axis
- * for overlays. Only works for x1, x2, etc.
- *)
-
- DDFXCAPS_OVERLAYARITHSTRETCHYN = $00000008;
-
- (*
- * DirectDraw supports arbitrary shrinking of a surface along the
- * x axis (horizontal direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSHRINKX = $00080000;
-
- (*
- * DirectDraw supports integer shrinking (1x,2x,) of a surface
- * along the x axis (horizontal direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSHRINKXN = $00100000;
-
- (*
- * DirectDraw supports arbitrary shrinking of a surface along the
- * y axis (horizontal direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSHRINKY = $00200000;
-
- (*
- * DirectDraw supports integer shrinking (1x,2x,) of a surface
- * along the y axis (vertical direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSHRINKYN = $00400000;
-
- (*
- * DirectDraw supports arbitrary stretching of a surface along the
- * x axis (horizontal direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSTRETCHX = $00800000;
-
- (*
- * DirectDraw supports integer stretching (1x,2x,) of a surface
- * along the x axis (horizontal direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSTRETCHXN = $01000000;
-
- (*
- * DirectDraw supports arbitrary stretching of a surface along the
- * y axis (horizontal direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSTRETCHY = $02000000;
-
- (*
- * DirectDraw supports integer stretching (1x,2x,) of a surface
- * along the y axis (vertical direction) for overlays.
- *)
-
- DDFXCAPS_OVERLAYSTRETCHYN = $04000000;
-
- (*
- * DirectDraw supports mirroring of overlays across the vertical axis
- *)
-
- DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000;
-
- (*
- * DirectDraw supports mirroring of overlays across the horizontal axis
- *)
-
- DDFXCAPS_OVERLAYMIRRORUPDOWN = $10000000;
-
- (****************************************************************************
- *
- * DIRECTDRAW STEREO VIEW CAPABILITIES
- *
- ****************************************************************************)
-
- (*
- * The stereo view is accomplished via enigma encoding.
- *)
-
- DDSVCAPS_ENIGMA = $00000001;
-
- (*
- * The stereo view is accomplished via high frequency flickering.
- *)
-
- DDSVCAPS_FLICKER = $00000002;
-
- (*
- * The stereo view is accomplished via red and blue filters applied
- * to the left and right eyes. All images must adapt their colorspaces
- * for this process.
- *)
-
- DDSVCAPS_REDBLUE = $00000004;
-
- (*
- * The stereo view is accomplished with split screen technology.
- *)
-
- DDSVCAPS_SPLIT = $00000008;
-
- (****************************************************************************
- *
- * DIRECTDRAWPALETTE CAPABILITIES
- *
- ****************************************************************************)
-
- (*
- * Index is 4 bits. There are sixteen color entries in the palette table.
- *)
-
- DDPCAPS_4BIT = $00000001;
-
- (*
- * Index is onto a 8 bit color index. This field is only valid with the
- * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
- * surface is in 8bpp. Each color entry is one byte long and is an index
- * into destination surface's 8bpp palette.
- *)
-
- DDPCAPS_8BITENTRIES = $00000002;
-
- (*
- * Index is 8 bits. There are 256 color entries in the palette table.
- *)
-
- DDPCAPS_8BIT = $00000004;
-
- (*
- * Indicates that this DIRECTDRAWPALETTE should use the palette color array
- * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
- * object.
- *)
-
- DDPCAPS_INITIALIZE = $00000008;
-
- (*
- * This palette is the one attached to the primary surface. Changing this
- * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
- * and supported.
- *)
-
- DDPCAPS_PRIMARYSURFACE = $00000010;
-
- (*
- * This palette is the one attached to the primary surface left. Changing
- * this table has immediate effect on the display for the left eye unless
- * DDPSETPAL_VSYNC is specified and supported.
- *)
-
- DDPCAPS_PRIMARYSURFACELEFT = $00000020;
-
- (*
- * This palette can have all 256 entries defined
- *)
-
- DDPCAPS_ALLOW256 = $00000040;
-
- (*
- * This palette can have modifications to it synced with the monitors
- * refresh rate.
- *)
-
- DDPCAPS_VSYNC = $00000080;
-
- (*
- * Index is 1 bit. There are two color entries in the palette table.
- *)
-
- DDPCAPS_1BIT = $00000100;
-
- (*
- * Index is 2 bit. There are four color entries in the palette table.
- *)
-
- DDPCAPS_2BIT = $00000200;
-
-
- (****************************************************************************
- *
- * DIRECTDRAWPALETTE SETENTRY CONSTANTS
- *
- ****************************************************************************)
-
-
- (****************************************************************************
- *
- * DIRECTDRAWPALETTE GETENTRY CONSTANTS
- *
- ****************************************************************************)
-
- (* 0 is the only legal value *)
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
- *
- ****************************************************************************)
-
-
- (****************************************************************************
- *
- * DIRECTDRAW BITDEPTH CONSTANTS
- *
- * NOTE: These are only used to indicate supported bit depths. These
- * are flags only, they are not to be used as an actual bit depth. The
- * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
- * bit depths in a surface or for changing the display mode.
- *
- ****************************************************************************)
-
- (*
- * 1 bit per pixel.
- *)
-
- DDBD_1 = $00004000;
-
- (*
- * 2 bits per pixel.
- *)
-
- DDBD_2 = $00002000;
-
- (*
- * 4 bits per pixel.
- *)
-
- DDBD_4 = $00001000;
-
- (*
- * 8 bits per pixel.
- *)
-
- DDBD_8 = $00000800;
-
- (*
- * 16 bits per pixel.
- *)
-
- DDBD_16 = $00000400;
-
- (*
- * 24 bits per pixel.
- *)
-
- DDBD_24 = $00000200;
-
- (*
- * 32 bits per pixel.
- *)
-
- DDBD_32 = $00000100;
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
- *
- ****************************************************************************)
-
- (*
- * Set if the structure contains a color space. Not set if the structure
- * contains a single color key.
- *)
-
- DDCKEY_COLORSPACE = $00000001;
-
- (*
- * Set if the structure specifies a color key or color space which is to be
- * used as a destination color key for blt operations.
- *)
-
- DDCKEY_DESTBLT = $00000002;
-
- (*
- * Set if the structure specifies a color key or color space which is to be
- * used as a destination color key for overlay operations.
- *)
-
- DDCKEY_DESTOVERLAY = $00000004;
-
- (*
- * Set if the structure specifies a color key or color space which is to be
- * used as a source color key for blt operations.
- *)
-
- DDCKEY_SRCBLT = $00000008;
-
- (*
- * Set if the structure specifies a color key or color space which is to be
- * used as a source color key for overlay operations.
- *)
-
- DDCKEY_SRCOVERLAY = $00000010;
-
-
- (****************************************************************************
- *
- * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
- *
- ****************************************************************************)
-
- (*
- * Supports transparent blting using a color key to identify the replaceable
- * bits of the destination surface for RGB colors.
- *)
-
- DDCKEYCAPS_DESTBLT = $00000001;
-
- (*
- * Supports transparent blting using a color space to identify the replaceable
- * bits of the destination surface for RGB colors.
- *)
-
- DDCKEYCAPS_DESTBLTCLRSPACE = $00000002;
-
- (*
- * Supports transparent blting using a color space to identify the replaceable
- * bits of the destination surface for YUV colors.
- *)
-
- DDCKEYCAPS_DESTBLTCLRSPACEYUV = $00000004;
-
- (*
- * Supports transparent blting using a color key to identify the replaceable
- * bits of the destination surface for YUV colors.
- *)
-
- DDCKEYCAPS_DESTBLTYUV = $00000008;
-
- (*
- * Supports overlaying using colorkeying of the replaceable bits of the surface
- * being overlayed for RGB colors.
- *)
-
- DDCKEYCAPS_DESTOVERLAY = $00000010;
-
- (*
- * Supports a color space as the color key for the destination for RGB colors.
- *)
-
- DDCKEYCAPS_DESTOVERLAYCLRSPACE = $00000020;
-
- (*
- * Supports a color space as the color key for the destination for YUV colors.
- *)
-
- DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = $00000040;
-
- (*
- * Supports only one active destination color key value for visible overlay
- * surfaces.
- *)
-
- DDCKEYCAPS_DESTOVERLAYONEACTIVE = $00000080;
-
- (*
- * Supports overlaying using colorkeying of the replaceable bits of the
- * surface being overlayed for YUV colors.
- *)
-
- DDCKEYCAPS_DESTOVERLAYYUV = $00000100;
-
- (*
- * Supports transparent blting using the color key for the source with
- * this surface for RGB colors.
- *)
-
- DDCKEYCAPS_SRCBLT = $00000200;
-
- (*
- * Supports transparent blting using a color space for the source with
- * this surface for RGB colors.
- *)
-
- DDCKEYCAPS_SRCBLTCLRSPACE = $00000400;
-
- (*
- * Supports transparent blting using a color space for the source with
- * this surface for YUV colors.
- *)
-
- DDCKEYCAPS_SRCBLTCLRSPACEYUV = $00000800;
-
- (*
- * Supports transparent blting using the color key for the source with
- * this surface for YUV colors.
- *)
-
- DDCKEYCAPS_SRCBLTYUV = $00001000;
-
- (*
- * Supports overlays using the color key for the source with this
- * overlay surface for RGB colors.
- *)
-
- DDCKEYCAPS_SRCOVERLAY = $00002000;
-
- (*
- * Supports overlays using a color space as the source color key for
- * the overlay surface for RGB colors.
- *)
-
- DDCKEYCAPS_SRCOVERLAYCLRSPACE = $00004000;
-
- (*
- * Supports overlays using a color space as the source color key for
- * the overlay surface for YUV colors.
- *)
-
- DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV = $00008000;
-
- (*
- * Supports only one active source color key value for visible
- * overlay surfaces.
- *)
-
- DDCKEYCAPS_SRCOVERLAYONEACTIVE = $00010000;
-
- (*
- * Supports overlays using the color key for the source with this
- * overlay surface for YUV colors.
- *)
-
- DDCKEYCAPS_SRCOVERLAYYUV = $00020000;
-
- (*
- * there are no bandwidth trade-offs for using colorkey with an overlay
- *)
-
- DDCKEYCAPS_NOCOSTOVERLAY = $00040000;
-
-
- (****************************************************************************
- *
- * DIRECTDRAW PIXELFORMAT FLAGS
- *
- ****************************************************************************)
-
- (*
- * The surface has alpha channel information in the pixel format.
- *)
-
- DDPF_ALPHAPIXELS = $00000001;
-
- (*
- * The pixel format contains alpha only information
- *)
-
- DDPF_ALPHA = $00000002;
-
- (*
- * The FourCC code is valid.
- *)
-
- DDPF_FOURCC = $00000004;
-
- (*
- * The surface is 4-bit color indexed.
- *)
-
- DDPF_PALETTEINDEXED4 = $00000008;
-
- (*
- * The surface is indexed into a palette which stores indices
- * into the destination surface's 8-bit palette.
- *)
-
- DDPF_PALETTEINDEXEDTO8 = $00000010;
-
- (*
- * The surface is 8-bit color indexed.
- *)
-
- DDPF_PALETTEINDEXED8 = $00000020;
-
- (*
- * The RGB data in the pixel format structure is valid.
- *)
-
- DDPF_RGB = $00000040;
-
- (*
- * The surface will accept pixel data in the format specified
- * and compress it during the write.
- *)
-
- DDPF_COMPRESSED = $00000080;
-
- (*
- * The surface will accept RGB data and translate it during
- * the write to YUV data. The format of the data to be written
- * will be contained in the pixel format structure. The DDPF_RGB
- * flag will be set.
- *)
-
- DDPF_RGBTOYUV = $00000100;
-
- (*
- * pixel format is YUV - YUV data in pixel format struct is valid
- *)
-
- DDPF_YUV = $00000200;
-
- (*
- * pixel format is a z buffer only surface
- *)
-
- DDPF_ZBUFFER = $00000400;
-
- (*
- * The surface is 1-bit color indexed.
- *)
-
- DDPF_PALETTEINDEXED1 = $00000800;
-
- (*
- * The surface is 2-bit color indexed.
- *)
-
- DDPF_PALETTEINDEXED2 = $00001000;
-
- (*===========================================================================
- *
- *
- * DIRECTDRAW CALLBACK FLAGS
- *
- *
- *==========================================================================*)
-
- (****************************************************************************
- *
- * DIRECTDRAW ENUMSURFACES FLAGS
- *
- ****************************************************************************)
-
- (*
- * Enumerate all of the surfaces that meet the search criterion.
- *)
-
- DDENUMSURFACES_ALL = $00000001;
-
- (*
- * A search hit is a surface that matches the surface description.
- *)
-
- DDENUMSURFACES_MATCH = $00000002;
-
- (*
- * A search hit is a surface that does not match the surface description.
- *)
-
- DDENUMSURFACES_NOMATCH = $00000004;
-
- (*
- * Enumerate the first surface that can be created which meets the search criterion.
- *)
-
- DDENUMSURFACES_CANBECREATED = $00000008;
-
- (*
- * Enumerate the surfaces that already exist that meet the search criterion.
- *)
-
- DDENUMSURFACES_DOESEXIST = $00000010;
-
-
- (****************************************************************************
- *
- * DIRECTDRAW ENUMDISPLAYMODES FLAGS
- *
- ****************************************************************************)
-
- (*
- * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
- * that a particular mode will be enumerated only once. This flag specifies whether
- * the refresh rate is taken into account when determining if a mode is unique.
- *)
-
- DDEDM_REFRESHRATES = $00000001;
-
-
- (****************************************************************************
- *
- * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
- *
- ****************************************************************************)
-
- (*
- * Exclusive mode owner will be responsible for the entire primary surface.
- * GDI can be ignored. used with DD
- *)
-
- DDSCL_FULLSCREEN = $00000001;
-
- (*
- * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
- *)
-
- DDSCL_ALLOWREBOOT = $00000002;
-
- (*
- * prevents DDRAW from modifying the application window.
- * prevents DDRAW from minimize/restore the application window on activation.
- *)
-
- DDSCL_NOWINDOWCHANGES = $00000004;
-
- (*
- * app wants to work as a regular Windows application
- *)
-
- DDSCL_NORMAL = $00000008;
-
- (*
- * app wants exclusive access
- *)
-
- DDSCL_EXCLUSIVE = $00000010;
-
-
- (*
- * app can deal with non-windows display modes
- *)
-
- DDSCL_ALLOWMODEX = $00000040;
-
-
- (****************************************************************************
- *
- * DIRECTDRAW BLT FLAGS
- *
- ****************************************************************************)
-
- (*
- * Use the alpha information in the pixel format or the alpha channel surface
- * attached to the destination surface as the alpha channel for this blt.
- *)
-
- DDBLT_ALPHADEST = $00000001;
-
- (*
- * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
- * for the destination surface for this blt.
- *)
-
- DDBLT_ALPHADESTCONSTOVERRIDE = $00000002;
-
- (*
- * The NEG suffix indicates that the destination surface becomes more
- * transparent as the alpha value increases. (0 is opaque)
- *)
-
- DDBLT_ALPHADESTNEG = $00000004;
-
- (*
- * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
- * channel for the destination for this blt.
- *)
-
- DDBLT_ALPHADESTSURFACEOVERRIDE = $00000008;
-
- (*
- * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
- * for the edges of the image that border the color key colors.
- *)
-
- DDBLT_ALPHAEDGEBLEND = $00000010;
-
- (*
- * Use the alpha information in the pixel format or the alpha channel surface
- * attached to the source surface as the alpha channel for this blt.
- *)
-
- DDBLT_ALPHASRC = $00000020;
-
- (*
- * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
- * for the source for this blt.
- *)
-
- DDBLT_ALPHASRCCONSTOVERRIDE = $00000040;
-
- (*
- * The NEG suffix indicates that the source surface becomes more transparent
- * as the alpha value increases. (0 is opaque)
- *)
-
- DDBLT_ALPHASRCNEG = $00000080;
-
- (*
- * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
- * for the source for this blt.
- *)
-
- DDBLT_ALPHASRCSURFACEOVERRIDE = $00000100;
-
- (*
- * Do this blt asynchronously through the FIFO in the order received. If
- * there is no room in the hardware FIFO fail the call.
- *)
-
- DDBLT_ASYNC = $00000200;
-
- (*
- * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
- * to fill the destination rectangle on the destination surface with.
- *)
-
- DDBLT_COLORFILL = $00000400;
-
- (*
- * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
- * to use for the blt.
- *)
-
- DDBLT_DDFX = $00000800;
-
- (*
- * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
- * that are not part of the Win32 API.
- *)
-
- DDBLT_DDROPS = $00001000;
-
- (*
- * Use the color key associated with the destination surface.
- *)
-
- DDBLT_KEYDEST = $00002000;
-
- (*
- * Use the dckDestColorkey field in the DDBLTFX structure as the color key
- * for the destination surface.
- *)
-
- DDBLT_KEYDESTOVERRIDE = $00004000;
-
- (*
- * Use the color key associated with the source surface.
- *)
-
- DDBLT_KEYSRC = $00008000;
-
- (*
- * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
- * for the source surface.
- *)
-
- DDBLT_KEYSRCOVERRIDE = $00010000;
-
- (*
- * Use the dwROP field in the DDBLTFX structure for the raster operation
- * for this blt. These ROPs are the same as the ones defined in the Win32 API.
- *)
-
- DDBLT_ROP = $00020000;
-
- (*
- * Use the dwRotationAngle field in the DDBLTFX structure as the angle
- * (specified in 1/100th of a degree) to rotate the surface.
- *)
-
- DDBLT_ROTATIONANGLE = $00040000;
-
- (*
- * Z-buffered blt using the z-buffers attached to the source and destination
- * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
- * z-buffer opcode.
- *)
-
- DDBLT_ZBUFFER = $00080000;
-
- (*
- * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
- * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
- * for the destination.
- *)
-
- DDBLT_ZBUFFERDESTCONSTOVERRIDE = $00100000;
-
- (*
- * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
- * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
- * respectively for the destination.
- *)
-
- DDBLT_ZBUFFERDESTOVERRIDE = $00200000;
-
- (*
- * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
- * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
- * for the source.
- *)
-
- DDBLT_ZBUFFERSRCCONSTOVERRIDE = $00400000;
-
- (*
- * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
- * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
- * respectively for the source.
- *)
-
- DDBLT_ZBUFFERSRCOVERRIDE = $00800000;
-
- (*
- * wait until the device is ready to handle the blt
- * this will cause blt to not return DDERR_WASSTILLDRAWING
- *)
-
- DDBLT_WAIT = $01000000;
-
- (*
- * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
- * to fill the destination rectangle on the destination Z-buffer surface
- * with.
- *)
-
- DDBLT_DEPTHFILL = $02000000;
-
-
- (****************************************************************************
- *
- * BLTFAST FLAGS
- *
- ****************************************************************************)
-
-
- DDBLTFAST_NOCOLORKEY = $00000000;
-
- DDBLTFAST_SRCCOLORKEY = $00000001;
-
- DDBLTFAST_DESTCOLORKEY = $00000002;
-
- DDBLTFAST_WAIT = $00000010;
-
- (****************************************************************************
- *
- * FLIP FLAGS
- *
- ****************************************************************************)
-
-
- DDFLIP_WAIT = $00000001;
-
-
- (****************************************************************************
- *
- * DIRECTDRAW SURFACE OVERLAY FLAGS
- *
- ****************************************************************************)
-
- (*
- * Use the alpha information in the pixel format or the alpha channel surface
- * attached to the destination surface as the alpha channel for the
- * destination overlay.
- *)
-
- DDOVER_ALPHADEST = $00000001;
-
- (*
- * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
- * destination alpha channel for this overlay.
- *)
-
- DDOVER_ALPHADESTCONSTOVERRIDE = $00000002;
-
- (*
- * The NEG suffix indicates that the destination surface becomes more
- * transparent as the alpha value increases.
- *)
-
- DDOVER_ALPHADESTNEG = $00000004;
-
- (*
- * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
- * channel destination for this overlay.
- *)
-
- DDOVER_ALPHADESTSURFACEOVERRIDE = $00000008;
-
- (*
- * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
- * channel for the edges of the image that border the color key colors.
- *)
-
- DDOVER_ALPHAEDGEBLEND = $00000010;
-
- (*
- * Use the alpha information in the pixel format or the alpha channel surface
- * attached to the source surface as the source alpha channel for this overlay.
- *)
-
- DDOVER_ALPHASRC = $00000020;
-
- (*
- * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
- * alpha channel for this overlay.
- *)
-
- DDOVER_ALPHASRCCONSTOVERRIDE = $00000040;
-
- (*
- * The NEG suffix indicates that the source surface becomes more transparent
- * as the alpha value increases.
- *)
-
- DDOVER_ALPHASRCNEG = $00000080;
-
- (*
- * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
- * source for this overlay.
- *)
-
- DDOVER_ALPHASRCSURFACEOVERRIDE = $00000100;
-
- (*
- * Turn this overlay off.
- *)
-
- DDOVER_HIDE = $00000200;
-
- (*
- * Use the color key associated with the destination surface.
- *)
-
- DDOVER_KEYDEST = $00000400;
-
- (*
- * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
- * for the destination surface
- *)
-
- DDOVER_KEYDESTOVERRIDE = $00000800;
-
- (*
- * Use the color key associated with the source surface.
- *)
-
- DDOVER_KEYSRC = $00001000;
-
- (*
- * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
- * for the source surface.
- *)
-
- DDOVER_KEYSRCOVERRIDE = $00002000;
-
- (*
- * Turn this overlay on.
- *)
-
- DDOVER_SHOW = $00004000;
-
- (*
- * Add a dirty rect to an emulated overlayed surface.
- *)
-
- DDOVER_ADDDIRTYRECT = $00008000;
-
- (*
- * Redraw all dirty rects on an emulated overlayed surface.
- *)
-
- DDOVER_REFRESHDIRTYRECTS = $00010000;
-
- (*
- * Redraw the entire surface on an emulated overlayed surface.
- *)
-
- DDOVER_REFRESHALL = $00020000;
-
-
- (*
- * Use the overlay FX flags to define special overlay FX
- *)
-
- DDOVER_DDFX = $00080000;
-
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE LOCK FLAGS
- *
- ****************************************************************************)
-
- (*
- * The default. Set to indicate that Lock should return a valid memory pointer
- * to the top of the specified rectangle. If no rectangle is specified then a
- * pointer to the top of the surface is returned.
- *)
-
- DDLOCK_SURFACEMEMORYPTR = $00000000; // = default
-
- (*
- * Set to indicate that Lock should wait until it can obtain a valid memory
- * pointer before returning. If this bit is set, Lock will never return
- * DDERR_WASSTILLDRAWING.
- *)
-
- DDLOCK_WAIT = $00000001;
-
- (*
- * Set if an event handle is being passed to Lock. Lock will trigger the event
- * when it can return the surface memory pointer requested.
- *)
-
- DDLOCK_EVENT = $00000002;
-
- (*
- * Indicates that the surface being locked will only be read from.
- *)
-
- DDLOCK_READONLY = $00000010;
-
- (*
- * Indicates that the surface being locked will only be written to
- *)
-
- DDLOCK_WRITEONLY = $00000020;
-
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE PAGELOCK FLAGS
- *
- ****************************************************************************)
-
- (*
- * No flags defined at present
- *)
-
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
- *
- ****************************************************************************)
-
- (*
- * No flags defined at present
- *)
-
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE BLT FX FLAGS
- *
- ****************************************************************************)
-
- (*
- * If stretching, use arithmetic stretching along the Y axis for this blt.
- *)
-
- DDBLTFX_ARITHSTRETCHY = $00000001;
-
- (*
- * Do this blt mirroring the surface left to right. Spin the
- * surface around its y-axis.
- *)
-
- DDBLTFX_MIRRORLEFTRIGHT = $00000002;
-
- (*
- * Do this blt mirroring the surface up and down. Spin the surface
- * around its x-axis.
- *)
-
- DDBLTFX_MIRRORUPDOWN = $00000004;
-
- (*
- * Schedule this blt to avoid tearing.
- *)
-
- DDBLTFX_NOTEARING = $00000008;
-
- (*
- * Do this blt rotating the surface one hundred and eighty degrees.
- *)
-
- DDBLTFX_ROTATE180 = $00000010;
-
- (*
- * Do this blt rotating the surface two hundred and seventy degrees.
- *)
-
- DDBLTFX_ROTATE270 = $00000020;
-
- (*
- * Do this blt rotating the surface ninety degrees.
- *)
-
- DDBLTFX_ROTATE90 = $00000040;
-
- (*
- * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
- * specified to limit the bits copied from the source surface.
- *)
-
- DDBLTFX_ZBUFFERRANGE = $00000080;
-
- (*
- * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
- * before comparing it with the desting z values.
- *)
-
- DDBLTFX_ZBUFFERBASEDEST = $00000100;
-
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE OVERLAY FX FLAGS
- *
- ****************************************************************************)
-
- (*
- * If stretching, use arithmetic stretching along the Y axis for this overlay.
- *)
-
- DDOVERFX_ARITHSTRETCHY = $00000001;
-
- (*
- * Mirror the overlay across the vertical axis
- *)
-
- DDOVERFX_MIRRORLEFTRIGHT = $00000002;
-
- (*
- * Mirror the overlay across the horizontal axis
- *)
-
- DDOVERFX_MIRRORUPDOWN = $00000004;
-
- (****************************************************************************
- *
- * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
- *
- ****************************************************************************)
-
- (*
- * return when the vertical blank interval begins
- *)
-
- DDWAITVB_BLOCKBEGIN = $00000001;
-
- (*
- * set up an event to trigger when the vertical blank begins
- *)
-
- DDWAITVB_BLOCKBEGINEVENT = $00000002;
-
- (*
- * return when the vertical blank interval ends and display begins
- *)
-
- DDWAITVB_BLOCKEND = $00000004;
-
- (****************************************************************************
- *
- * DIRECTDRAW GETFLIPSTATUS FLAGS
- *
- ****************************************************************************)
-
- (*
- * is it OK to flip now?
- *)
-
- DDGFS_CANFLIP = $00000001;
-
- (*
- * is the last flip finished?
- *)
-
- DDGFS_ISFLIPDONE = $00000002;
-
- (****************************************************************************
- *
- * DIRECTDRAW GETBLTSTATUS FLAGS
- *
- ****************************************************************************)
-
- (*
- * is it OK to blt now?
- *)
-
- DDGBS_CANBLT = $00000001;
-
- (*
- * is the blt to the surface finished?
- *)
-
- DDGBS_ISBLTDONE = $00000002;
-
-
- (****************************************************************************
- *
- * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
- *
- ****************************************************************************)
-
- (*
- * Enumerate overlays back to front.
- *)
-
- DDENUMOVERLAYZ_BACKTOFRONT = $00000000;
-
- (*
- * Enumerate overlays front to back
- *)
-
- DDENUMOVERLAYZ_FRONTTOBACK = $00000001;
-
- (****************************************************************************
- *
- * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
- *
- ****************************************************************************)
-
- (*
- * Send overlay to front
- *)
-
- DDOVERZ_SENDTOFRONT = $00000000;
-
- (*
- * Send overlay to back
- *)
-
- DDOVERZ_SENDTOBACK = $00000001;
-
- (*
- * Move Overlay forward
- *)
-
- DDOVERZ_MOVEFORWARD = $00000002;
-
- (*
- * Move Overlay backward
- *)
-
- DDOVERZ_MOVEBACKWARD = $00000003;
-
- (*
- * Move Overlay in front of relative surface
- *)
-
- DDOVERZ_INSERTINFRONTOF = $00000004;
-
- (*
- * Move Overlay in back of relative surface
- *)
-
- DDOVERZ_INSERTINBACKOF = $00000005;
-
- (*===========================================================================
- *
- *
- * DIRECTDRAW RETURN CODES
- *
- * The return values from DirectDraw Commands and Surface that return an HRESULT
- * are codes from DirectDraw concerning the results of the action
- * requested by DirectDraw.
- *
- *==========================================================================*)
-
- (*
- * Status is OK
- *
- * Issued by: DirectDraw Commands and all callbacks
- *)
-
- DD_OK = 0;
-
- (****************************************************************************
- *
- * DIRECTDRAW ENUMCALLBACK RETURN VALUES
- *
- * EnumCallback returns are used to control the flow of the DIRECTDRAW and
- * DIRECTDRAWSURFACE object enumerations. They can only be returned by
- * enumeration callback routines.
- *
- ****************************************************************************)
-
- (*
- * stop the enumeration
- *)
-
- DDENUMRET_CANCEL = 0;
-
- (*
- * continue the enumeration
- *)
-
- DDENUMRET_OK = 1;
-
- (****************************************************************************
- *
- * DIRECTDRAW ERRORS
- *
- * Errors are represented by negative values and cannot be combined.
- *
- ****************************************************************************)
-
- (*
- * This object is already initialized
- *)
- DDERR_ALREADYINITIALIZED = $88760000 + 5;
-
- (*
- * This surface can not be attached to the requested surface.
- *)
- DDERR_CANNOTATTACHSURFACE = $88760000 + 10;
-
- (*
- * This surface can not be detached from the requested surface.
- *)
- DDERR_CANNOTDETACHSURFACE = $88760000 + 20;
-
- (*
- * Support is currently not available.
- *)
- DDERR_CURRENTLYNOTAVAIL = $88760000 + 40;
-
- (*
- * An exception was encountered while performing the requested operation
- *)
- DDERR_EXCEPTION = $88760000 + 55;
-
- (*
- * Generic failure.
- *)
-
- DDERR_GENERIC = E_FAIL;
-
- (*
- * Height of rectangle provided is not a multiple of reqd alignment
- *)
- DDERR_HEIGHTALIGN = $88760000 + 90;
-
- (*
- * Unable to match primary surface creation request with existing
- * primary surface.
- *)
- DDERR_INCOMPATIBLEPRIMARY = $88760000 + 95;
-
- (*
- * One or more of the caps bits passed to the callback are incorrect.
- *)
- DDERR_INVALIDCAPS = $88760000 + 100;
-
- (*
- * DirectDraw does not support provided Cliplist.
- *)
-
- DDERR_INVALIDCLIPLIST = $88760000 + 110;
-
- (*
- * DirectDraw does not support the requested mode
- *)
-
- DDERR_INVALIDMODE = $88760000 + 120;
-
- (*
- * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
- *)
-
- DDERR_INVALIDOBJECT = $88760000 + 130;
-
- (*
- * One or more of the parameters passed to the callback function are
- * incorrect.
- *)
-
-
- DDERR_INVALIDPARAMS = E_INVALIDARG;
-
- (*
- * pixel format was invalid as specified
- *)
-
- DDERR_INVALIDPIXELFORMAT = $88760000 + 145;
-
- (*
- * Rectangle provided was invalid.
- *)
-
- DDERR_INVALIDRECT = $88760000 + 150;
-
- (*
- * Operation could not be carried out because one or more surfaces are locked
- *)
-
- DDERR_LOCKEDSURFACES = $88760000 + 160;
-
- (*
- * There is no 3D present.
- *)
-
- DDERR_NO3D = $88760000 + 170;
-
- (*
- * Operation could not be carried out because there is no alpha accleration
- * hardware present or available.
- *)
-
- DDERR_NOALPHAHW = $88760000 + 180;
-
-
- (*
- * no clip list available
- *)
-
- DDERR_NOCLIPLIST = $88760000 + 205;
-
- (*
- * Operation could not be carried out because there is no color conversion
- * hardware present or available.
- *)
-
- DDERR_NOCOLORCONVHW = $88760000 + 210;
-
- (*
- * Create function called without DirectDraw object method SetCooperativeLevel
- * being called.
- *)
-
- DDERR_NOCOOPERATIVELEVELSET = $88760000 + 212;
-
- (*
- * Surface doesn't currently have a color key
- *)
-
- DDERR_NOCOLORKEY = $88760000 + 215;
-
- (*
- * Operation could not be carried out because there is no hardware support
- * of the dest color key.
- *)
-
- DDERR_NOCOLORKEYHW = $88760000 + 220;
-
- (*
- * No DirectDraw support possible with current display driver
- *)
-
- DDERR_NODIRECTDRAWSUPPORT = $88760000 + 222;
-
- (*
- * Operation requires the application to have exclusive mode but the
- * application does not have exclusive mode.
- *)
-
- DDERR_NOEXCLUSIVEMODE = $88760000 + 225;
-
- (*
- * Flipping visible surfaces is not supported.
- *)
-
- DDERR_NOFLIPHW = $88760000 + 230;
-
- (*
- * There is no GDI present.
- *)
-
- DDERR_NOGDI = $88760000 + 240;
-
- (*
- * Operation could not be carried out because there is no hardware present
- * or available.
- *)
-
- DDERR_NOMIRRORHW = $88760000 + 250;
-
- (*
- * Requested item was not found
- *)
-
- DDERR_NOTFOUND = $88760000 + 255;
-
- (*
- * Operation could not be carried out because there is no overlay hardware
- * present or available.
- *)
-
- DDERR_NOOVERLAYHW = $88760000 + 260;
-
- (*
- * Operation could not be carried out because there is no appropriate raster
- * op hardware present or available.
- *)
-
- DDERR_NORASTEROPHW = $88760000 + 280;
-
- (*
- * Operation could not be carried out because there is no rotation hardware
- * present or available.
- *)
-
- DDERR_NOROTATIONHW = $88760000 + 290;
-
- (*
- * Operation could not be carried out because there is no hardware support
- * for stretching
- *)
-
- DDERR_NOSTRETCHHW = $88760000 + 310;
-
- (*
- * DirectDrawSurface is not in 4 bit color palette and the requested operation
- * requires 4 bit color palette.
- *)
-
- DDERR_NOT4BITCOLOR = $88760000 + 316;
-
- (*
- * DirectDrawSurface is not in 4 bit color index palette and the requested
- * operation requires 4 bit color index palette.
- *)
-
- DDERR_NOT4BITCOLORINDEX = $88760000 + 317;
-
- (*
- * DirectDraw Surface is not in 8 bit color mode and the requested operation
- * requires 8 bit color.
- *)
-
- DDERR_NOT8BITCOLOR = $88760000 + 320;
-
- (*
- * Operation could not be carried out because there is no texture mapping
- * hardware present or available.
- *)
-
- DDERR_NOTEXTUREHW = $88760000 + 330;
-
- (*
- * Operation could not be carried out because there is no hardware support
- * for vertical blank synchronized operations.
- *)
-
- DDERR_NOVSYNCHW = $88760000 + 335;
-
- (*
- * Operation could not be carried out because there is no hardware support
- * for zbuffer blting.
- *)
-
- DDERR_NOZBUFFERHW = $88760000 + 340;
-
- (*
- * Overlay surfaces could not be z layered based on their BltOrder because
- * the hardware does not support z layering of overlays.
- *)
-
- DDERR_NOZOVERLAYHW = $88760000 + 350;
-
- (*
- * The hardware needed for the requested operation has already been
- * allocated.
- *)
-
- DDERR_OUTOFCAPS = $88760000 + 360;
-
- (*
- * DirectDraw does not have enough memory to perform the operation.
- *)
-
-
- DDERR_OUTOFMEMORY = E_OUTOFMEMORY;
-
- (*
- * DirectDraw does not have enough memory to perform the operation.
- *)
-
- DDERR_OUTOFVIDEOMEMORY = $88760000 + 380;
-
- (*
- * hardware does not support clipped overlays
- *)
-
- DDERR_OVERLAYCANTCLIP = $88760000 + 382;
-
- (*
- * Can only have ony color key active at one time for overlays
- *)
-
- DDERR_OVERLAYCOLORKEYONLYONEACTIVE = $88760000 + 384;
-
- (*
- * Access to this palette is being refused because the palette is already
- * locked by another thread.
- *)
-
- DDERR_PALETTEBUSY = $88760000 + 387;
-
- (*
- * No src color key specified for this operation.
- *)
-
- DDERR_COLORKEYNOTSET = $88760000 + 400;
-
- (*
- * This surface is already attached to the surface it is being attached to.
- *)
-
- DDERR_SURFACEALREADYATTACHED = $88760000 + 410;
-
- (*
- * This surface is already a dependency of the surface it is being made a
- * dependency of.
- *)
-
- DDERR_SURFACEALREADYDEPENDENT = $88760000 + 420;
-
- (*
- * Access to this surface is being refused because the surface is already
- * locked by another thread.
- *)
-
- DDERR_SURFACEBUSY = $88760000 + 430;
-
- (*
- * Access to this surface is being refused because no driver exists
- * which can supply a pointer to the surface.
- * This is most likely to happen when attempting to lock the primary
- * surface when no DCI provider is present.
- *)
-
- DDERR_CANTLOCKSURFACE = $88760000 + 435;
-
- (*
- * Access to Surface refused because Surface is obscured.
- *)
-
- DDERR_SURFACEISOBSCURED = $88760000 + 440;
-
- (*
- * Access to this surface is being refused because the surface is gone.
- * The DIRECTDRAWSURFACE object representing this surface should
- * have Restore called on it.
- *)
-
- DDERR_SURFACELOST = $88760000 + 450;
-
- (*
- * The requested surface is not attached.
- *)
-
- DDERR_SURFACENOTATTACHED = $88760000 + 460;
-
- (*
- * Height requested by DirectDraw is too large.
- *)
-
- DDERR_TOOBIGHEIGHT = $88760000 + 470;
-
- (*
- * Size requested by DirectDraw is too large -- The individual height and
- * width are OK.
- *)
-
- DDERR_TOOBIGSIZE = $88760000 + 480;
-
- (*
- * Width requested by DirectDraw is too large.
- *)
-
- DDERR_TOOBIGWIDTH = $88760000 + 490;
-
- (*
- * Action not supported.
- *)
-
-
- DDERR_UNSUPPORTED = E_NOTIMPL;
-
- (*
- * FOURCC format requested is unsupported by DirectDraw
- *)
-
- DDERR_UNSUPPORTEDFORMAT = $88760000 + 510;
-
- (*
- * Bitmask in the pixel format requested is unsupported by DirectDraw
- *)
-
- DDERR_UNSUPPORTEDMASK = $88760000 + 520;
-
- (*
- * vertical blank is in progress
- *)
-
- DDERR_VERTICALBLANKINPROGRESS = $88760000 + 537;
-
- (*
- * Informs DirectDraw that the previous Blt which is transfering information
- * to or from this Surface is incomplete.
- *)
-
- DDERR_WASSTILLDRAWING = $88760000 + 540;
-
- (*
- * Rectangle provided was not horizontally aligned on reqd. boundary
- *)
-
- DDERR_XALIGN = $88760000 + 560;
-
- (*
- * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
- * identifier.
- *)
-
- DDERR_INVALIDDIRECTDRAWGUID = $88760000 + 561;
-
- (*
- * A DirectDraw object representing this driver has already been created
- * for this process.
- *)
-
- DDERR_DIRECTDRAWALREADYCREATED = $88760000 + 562;
-
- (*
- * A hardware only DirectDraw object creation was attempted but the driver
- * did not support any hardware.
- *)
-
- DDERR_NODIRECTDRAWHW = $88760000 + 563;
-
- (*
- * this process already has created a primary surface
- *)
-
- DDERR_PRIMARYSURFACEALREADYEXISTS = $88760000 + 564;
-
- (*
- * software emulation not available.
- *)
-
- DDERR_NOEMULATION = $88760000 + 565;
-
- (*
- * region passed to Clipper::GetClipList is too small.
- *)
-
- DDERR_REGIONTOOSMALL = $88760000 + 566;
-
- (*
- * an attempt was made to set a clip list for a clipper objec that
- * is already monitoring an hwnd.
- *)
-
- DDERR_CLIPPERISUSINGHWND = $88760000 + 567;
-
- (*
- * No clipper object attached to surface object
- *)
-
- DDERR_NOCLIPPERATTACHED = $88760000 + 568;
-
- (*
- * Clipper notification requires an HWND or
- * no HWND has previously been set as the CooperativeLevel HWND.
- *)
-
- DDERR_NOHWND = $88760000 + 569;
-
- (*
- * HWND used by DirectDraw CooperativeLevel has been subclassed,
- * this prevents DirectDraw from restoring state.
- *)
-
- DDERR_HWNDSUBCLASSED = $88760000 + 570;
-
- (*
- * The CooperativeLevel HWND has already been set.
- * It can not be reset while the process has surfaces or palettes created.
- *)
-
- DDERR_HWNDALREADYSET = $88760000 + 571;
-
- (*
- * No palette object attached to this surface.
- *)
-
- DDERR_NOPALETTEATTACHED = $88760000 + 572;
-
- (*
- * No hardware support for 16 or 256 color palettes.
- *)
-
- DDERR_NOPALETTEHW = $88760000 + 573;
-
- (*
- * If a clipper object is attached to the source surface passed into a
- * BltFast call.
- *)
-
- DDERR_BLTFASTCANTCLIP = $88760000 + 574;
-
- (*
- * No blter.
- *)
-
- DDERR_NOBLTHW = $88760000 + 575;
-
- (*
- * No DirectDraw ROP hardware.
- *)
-
- DDERR_NODDROPSHW = $88760000 + 576;
-
- (*
- * returned when GetOverlayPosition is called on a hidden overlay
- *)
-
- DDERR_OVERLAYNOTVISIBLE = $88760000 + 577;
-
- (*
- * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
- * has never been called on to establish a destionation.
- *)
-
- DDERR_NOOVERLAYDEST = $88760000 + 578;
-
- (*
- * returned when the position of the overlay on the destionation is no longer
- * legal for that destionation.
- *)
-
- DDERR_INVALIDPOSITION = $88760000 + 579;
-
- (*
- * returned when an overlay member is called for a non-overlay surface
- *)
-
- DDERR_NOTAOVERLAYSURFACE = $88760000 + 580;
-
- (*
- * An attempt was made to set the cooperative level when it was already
- * set to exclusive.
- *)
-
- DDERR_EXCLUSIVEMODEALREADYSET = $88760000 + 581;
-
- (*
- * An attempt has been made to flip a surface that is not flippable.
- *)
-
- DDERR_NOTFLIPPABLE = $88760000 + 582;
-
- (*
- * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
- * created.
- *)
-
- DDERR_CANTDUPLICATE = $88760000 + 583;
-
- (*
- * Surface was not locked. An attempt to unlock a surface that was not
- * locked at all, or by this process, has been attempted.
- *)
-
- DDERR_NOTLOCKED = $88760000 + 584;
-
- (*
- * Windows can not create any more DCs
- *)
-
- DDERR_CANTCREATEDC = $88760000 + 585;
-
- (*
- * No DC was ever created for this surface.
- *)
-
- DDERR_NODC = $88760000 + 586;
-
- (*
- * This surface can not be restored because it was created in a different
- * mode.
- *)
-
- DDERR_WRONGMODE = $88760000 + 587;
-
- (*
- * This surface can not be restored because it is an implicitly created
- * surface.
- *)
-
- DDERR_IMPLICITLYCREATED = $88760000 + 588;
-
- (*
- * The surface being used is not a palette-based surface
- *)
-
- DDERR_NOTPALETTIZED = $88760000 + 589;
-
- (*
- * The display is currently in an unsupported mode
- *)
-
- DDERR_UNSUPPORTEDMODE = $88760000 + 590;
-
- (*
- * Operation could not be carried out because there is no mip-map
- * texture mapping hardware present or available.
- *)
-
- DDERR_NOMIPMAPHW = $88760000 + 591;
-
- (*
- * The requested action could not be performed because the surface was of
- * the wrong type.
- *)
-
- DDERR_INVALIDSURFACETYPE = $88760000 + 592;
-
- (*
- * A DC has already been returned for this surface. Only one DC can be
- * retrieved per surface.
- *)
-
- DDERR_DCALREADYCREATED = $88760000 + 620;
-
- (*
- * The attempt to page lock a surface failed.
- *)
-
- DDERR_CANTPAGELOCK = $88760000 + 640;
-
- (*
- * The attempt to page unlock a surface failed.
- *)
-
- DDERR_CANTPAGEUNLOCK = $88760000 + 660;
-
- (*
- * An attempt was made to page unlock a surface with no outstanding page locks.
- *)
-
- DDERR_NOTPAGELOCKED = $88760000 + 680;
-
- (*
- * An attempt was made to invoke an interface member of a DirectDraw object
- * created by CoCreateInstance() before it was initialized.
- *)
-
- DDERR_NOTINITIALIZED = CO_E_NOTINITIALIZED;
-
- type
- TDDENUMCALLBACK = function (const GUID: TGUID; DriverDescription: PChar;
- lpDriverName: PChar; lpContext: Pointer): BOOL; stdcall;
-
- const
- REGSTR_KEY_DDHW_DESCRIPTION = 'Description';
- REGSTR_KEY_DDHW_DRIVERNAME = 'DriverName';
- REGSTR_PATH_DDHW = 'Hardware\DirectDrawDrivers';
-
- DDCREATE_HARDWAREONLY = $00000001;
- DDCREATE_EMULATIONONLY = $00000002;
-
- function DirectDrawEnumerate (lpCallback: TDDENUMCALLBACK;
- lpContext: Pointer): HRESULT; stdcall;
-
- // begin *NTR 4/2/97
-
- (*
- function DirectDrawCreate (const GUID: TGUID; out DD: IDirectDraw;
- pUnkOuter: IUnknown): HRESULT; stdcall;
-
- HRESULT DirectDrawCreate(
- GUID FAR * lpGUID,
- LPDIRECTDRAW FAR *lplpDD,
- IUnknown FAR *pUnkOuter )
- *)
-
- function DirectDrawCreate (const GUID: PGUID; out DD: IDirectDraw;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- // end NTR 4/2/97
-
- function DirectDrawCreateClipper (dwFlags: DWORD;
- out DDClipper: IDirectDrawClipper; const pUnkOuter: IUnknown): HRESULT; stdcall;
- function NtDirectDrawCreate (const GUID: TGUID; var lplpDD: THandle;
- const pUnkOuter: IUnknown): HRESULT; stdcall;
-
-
- { --------------- Direct Play ---------------- }
-
- (*
- * This flag is set on the EnumSessions callback dwFlags parameter when
- * the time out has occurred. There will be no session data for this
- * callback. If *lpdwTimeOut is set to a non-zero value and the
- * EnumSessionsCallback function returns TRUE then EnumSessions will
- * continue waiting until the next timeout occurs. Timeouts are in
- * milliseconds.
- *)
- const
- DPESC_TIMEDOUT = $00000001;
-
- (****************************************************************************
- *
- * DirectPlay Structures
- *
- * Various structures used to invoke DirectPlay.
- *
- ****************************************************************************)
-
- type
- IDirectPlay2 = interface;
- IDirectPlay2A = interface;
-
- (*
- * DPID
- * DirectPlay player and group ID
- *)
-
- DPID = DWORD;
- PDPID = ^DPID;
-
- (*
- * DPCAPS
- * Used to obtain the capabilities of a DirectPlay object
- *)
-
- TDPCAPS = record
- dwSize: DWORD; // Size of structure, in bytes
- dwFlags: DWORD; // DPCAPS_xxx flags
- dwMaxBufferSize: DWORD; // Maximum message size, in bytes, for this service provider
- dwMaxQueueSize: DWORD; // Obsolete.
- dwMaxPlayers: DWORD; // Maximum players/groups (local + remote)
- dwHundredBaud: DWORD; // Bandwidth in 100 bits per second units;
- // i.e. 24 is 2400, 96 is 9600, etc.
- dwLatency: DWORD; // Estimated latency; 0 = unknown
- dwMaxLocalPlayers: DWORD; // Maximum # of locally created players allowed
- dwHeaderLength: DWORD; // Maximum header length, in bytes, on messages
- // added by the service provider
- dwTimeout: DWORD; // Service provider's suggested timeout value
- // This is how long DirectPlay will wait for
- // responses to system messages
- end;
- PDPCAPS = ^TDPCAPS;
-
- (*
- * DPSESSIONDESC2
- * Used to describe the properties of a DirectPlay
- * session instance
- *)
- TDPSESSIONDESC2 = record
- dwSize: DWORD; // Size of structure
- dwFlags: DWORD; // DPSESSION_xxx flags
- guidInstance: TGUID; // ID for the session instance
- guidApplication: TGUID; // GUID of the DirectPlay application.
- // GUID_NULL for all applications.
- dwMaxPlayers: DWORD; // Maximum # players allowed in session
- dwCurrentPlayers: DWORD; // Current # players in session (read only)
- lpszSessionNameA: PChar; // Name of the session
- lpszPasswordA: PChar; // Password of the session (optional)
- dwReserved1: DWORD; // Reserved for future MS use.
- dwReserved2: DWORD;
- dwUser1: DWORD; // For use by the application
- dwUser2: DWORD;
- dwUser3: DWORD;
- dwUser4: DWORD;
- end;
- PDPSESSIONDESC2 = ^TDPSESSIONDESC2;
-
- (*
- * LPCDPSESSIONDESC2
- * A constant pointer to DPSESSIONDESC2
- *)
- // typedef const DPSESSIONDESC2 FAR *LPCDPSESSIONDESC2;
-
- (*
- * DPNAME
- * Used to hold the name of a DirectPlay entity
- * like a player or a group
- *)
-
- TDPNAME = record
- dwSize: DWORD; // Size of structure
- dwFlags: DWORD; // Not used. Must be zero.
- lpszShortName: PChar; // The short or friendly name
- lpszLongName: PChar; // The long or formal name
- end;
- PDPNAME = ^TDPNAME;
-
- (*
- * LPCDPNAME
- * A constant pointer to DPNAME
- *)
- // typedef const DPNAME FAR *LPCDPNAME;
-
-
- (****************************************************************************
- *
- * Prototypes for DirectPlay callback functions
- *
- ****************************************************************************)
-
- (*
- * Callback for IDirectPlay2::EnumSessions
- *)
- TDPENUMSESSIONSCALLBACK2 = function (const lpThisSD: TDPSESSIONDESC2;
- var lpdwTimeOut: DWORD; dwFlags: DWORD; lpContext: Pointer): BOOL;
- stdcall;
-
- (*
- * Callback for IDirectPlay2::EnumPlayers
- * IDirectPlay2::EnumGroups
- * IDirectPlay2::EnumGroupPlayers
- *)
-
- TDPENUMPLAYERSCALLBACK2 = function (dpId: DPID; dwPlayerType: DWORD;
- const lpName: TDPNAME; dwFlags: DWORD; lpContext: Pointer): BOOL;
- stdcall;
-
- (*
- * Unicode callback for DirectPlayEnumerate
- *)
- TDPENUMDPCALLBACKW = function (var lpguidSP: TGUID; lpSPName: PWideChar;
- dwMajorVersion, dwMinorVersion: DWORD; lpContext: Pointer): BOOL;
- stdcall;
-
- (*
- * ANSI callback for DirectPlayEnumerate
- *)
- TDPENUMDPCALLBACKA = function (var lpguidSP: TGUID; lpSPName: PChar;
- dwMajorVersion, dwMinorVersion: DWORD; lpContext: Pointer): BOOL;
- stdcall;
-
- TDPENUMDPCALLBACK = TDPENUMDPCALLBACKA;
-
- (****************************************************************************
- *
- * IDirectPlay2 (and IDirectPlay2A) Interface
- *
- ****************************************************************************)
-
- IDirectPlay2 = interface (IUnknown)
- ['{2b74f7c0-9154-11cf-a9cd-00aa006886e3}']
- function AddPlayerToGroup (idGroup, idPlayer: DPID): HRESULT; stdcall;
- function Close: HRESULT; stdcall;
- function CreateGroup (var lpidGroup: DPID; var lpGroupName: TDPNAME;
- lpData: Pointer; dwDataSize, dwFlags: DWORD): HRESULT; stdcall;
- function CreatePlayer (var lpidPlayer: DPID; var lpPlayerName: TDPNAME;
- hEvent: THANDLE; lpData: Pointer; dwDataSize,
- dwFlags: DWORD): HRESULT; stdcall;
- function DeletePlayerFromGroup (idGroup, idPlayer: DPID): HRESULT; stdcall;
- function DestroyGroup (idGroup: DPID): HRESULT; stdcall;
- function DestroyPlayer (idPlayer: DPID): HRESULT; stdcall;
- function EnumGroupPlayers (idGroup: DPID; const lpguidInstance: TGUID;
- EnumPlayersCallback2: TDPENUMPLAYERSCALLBACK2; lpContext: Pointer;
- dwFlags: DWORD): HRESULT; stdcall;
- function EnumGroups (const lpguidInstance: TGUID;
- lpEnumPlayersCallback2: TDPENUMPLAYERSCALLBACK2; lpContext: Pointer;
- dwFlags: DWORD): HRESULT; stdcall;
- function EnumPlayers (const lpguidInstance: TGUID;
- lpEnumPlayersCallback2: TDPENUMPLAYERSCALLBACK2; lpContext: Pointer;
- dwFlags: DWORD): HRESULT; stdcall;
- function EnumSessions (var lpsd: TDPSESSIONDESC2; dwTimeout: DWORD;
- lpEnumSessionsCallback2: TDPENUMSESSIONSCALLBACK2; lpContext: Pointer;
- dwFlags: DWORD): HRESULT; stdcall;
- function GetCaps (var lpDPCaps: TDPCAPS;
- dwFlags: DWORD): HRESULT; stdcall;
- function GetGroupData (idGroup: DPID; lpData: Pointer;
- var lpdwDataSize: DWORD; dwFlags: DWORD): HRESULT; stdcall;
- function GetGroupName (idGroup: DPID; lpData: Pointer;
- var lpdwDataSize: DWORD): HRESULT; stdcall;
- function GetMessageCount (idPlayer: DPID;
- var lpdwCount: DWORD): HRESULT; stdcall;
- function GetPlayerAddress (idPlayer: DPID; lpAddress: Pointer;
- var lpdwAddressSize: DWORD): HRESULT; stdcall;
- function GetPlayerCaps (idPlayer: DPID; var lpPlayerCaps: TDPCAPS;
- dwFlags: DWORD): HRESULT; stdcall;
- function GetPlayerData (idPlayer: DPID; lpData: Pointer;
- var lpdwDataSize: DWORD; dwFlags: DWORD): HRESULT; stdcall;
- function GetPlayerName (idPlayer: DPID; lpData: Pointer;
- var lpdwDataSize: DWORD): HRESULT; stdcall;
- function GetSessionDesc (lpData: Pointer;
- var lpdwDataSize: DWORD): HRESULT; stdcall;
- function Initialize (const GUID: TGUID): HRESULT; stdcall;
- function Open (var lpsd: TDPSESSIONDESC2;
- dwFlags: DWORD): HRESULT; stdcall;
- function Receive (var lpidFrom, lpidTo: DPID; dwFlags: DWORD;
- lpData: Pointer; var lpdwDataSize: DWORD): HRESULT; stdcall;
- function Send (idFrom, idTo: DPID; dwFlags: DWORD; lpData: Pointer;
- dwDataSize: DWORD): HRESULT; stdcall;
- function SetGroupData (idGroup: DPID; lpData: Pointer;
- dwDataSize: DWORD; dwFlags: DWORD): HRESULT; stdcall;
- function SetGroupName (idGroup: DPID; var lpGroupName: TDPNAME;
- dwFlags: DWORD): HRESULT; stdcall;
- function SetPlayerData (idPlayer: DPID; lpData: Pointer; dwDataSize,
- dwFlags: DWORD): HRESULT; stdcall;
- function SetPlayerName (idPlayer: DPID; var lpPlayerName: TDPNAME;
- dwFlags: DWORD): HRESULT; stdcall;
- function SetSessionDesc (var lpSessDesc: TDPSESSIONDESC2;
- dwFlags: DWORD): HRESULT; stdcall;
- end;
-
- IDirectPlay2A = interface(IDirectPlay2)
- ['{9d460580-a822-11cf-960c-0080c7534e82}']
- end;
-
- (*
- * DPID that system messages come from
- *)
-
- const
- DPID_SYSMSG = 0;
-
- (*
- * DPID representing all players in the session
- *)
-
- DPID_ALLPLAYERS = 0;
-
- (*
- * This DirectPlay object is the session host. If the host exits the
- * session, another application will become the host and receive a
- * DPSYS_HOST system message.
- *)
- DPCAPS_ISHOST = $00000002;
-
- (*
- * The service provider bound to this DirectPlay object can optimize
- * group messaging.
- *)
- DPCAPS_GROUPOPTIMIZED = $00000008;
-
- (*
- * The service provider bound to this DirectPlay object can optimize
- * keep alives (see DPSESSION_KEEPALIVE)
- *)
- DPCAPS_KEEPALIVEOPTIMIZED = $00000010;
-
- (*
- * The service provider bound to this DirectPlay object can optimize
- * guaranteed message delivery.
- *)
- DPCAPS_GUARANTEEDOPTIMIZED = $00000020;
-
- (*
- * This DirectPlay object supports guaranteed message delivery.
- *)
- DPCAPS_GUARANTEEDSUPPORTED = $00000040;
-
- (*
- * Applications cannot create new players in this session.
- *)
- DPSESSION_NEWPLAYERSDISABLED = $00000001;
-
- (*
- * If the DirectPlay object that created the session, the host,
- * quits, then the host will attempt to migrate to another
- * DirectPlay object so that new players can continue to be created
- * and new applications can join the session.
- *)
- DPSESSION_MIGRATEHOST = $00000004;
-
- (*
- * This flag tells DirectPlay not to set the idPlayerTo and idPlayerFrom
- * fields in player messages. This cuts two DWORD's off the message
- * overhead.
- *)
- DPSESSION_NOMESSAGEID = $00000008;
-
-
- (*
- * This flag tells DirectPlay to not allow any new applications to
- * join the session. Applications already in the session can still
- * create new players.
- *)
- DPSESSION_JOINDISABLED = $00000020;
-
- (*
- * This flag tells DirectPlay to detect when remote players
- * exit abnormally (e.g. their computer or modem gets unplugged)
- *)
- DPSESSION_KEEPALIVE = $00000040;
-
- (*
- * This flag tells DirectPlay not to send a message to all players
- * when a players remote data changes
- *)
- DPSESSION_NODATAMESSAGES = $00000080;
-
- (****************************************************************************
- *
- * EnumPlayers API flags
- *
- ****************************************************************************)
-
- (*
- * Enumerate all players in the current session
- *)
- DPENUMPLAYERS_ALL = $00000000;
-
- (*
- * Enumerate only local (created by this application) players
- *)
- DPENUMPLAYERS_LOCAL = $00000008;
-
- (*
- * Enumerate only remote (non-local) players
- *)
- DPENUMPLAYERS_REMOTE = $00000010;
-
- (*
- * Enumerate groups along with the players
- *)
- DPENUMPLAYERS_GROUP = $00000020;
-
- (*
- * Enumerate players in another session (must supply lpguidInstance)
- *)
- DPENUMPLAYERS_SESSION = $00000080;
-
-
- (****************************************************************************
- *
- * EnumSessions API flags
- *
- ****************************************************************************)
-
- (*
- * Enumerate sessions which can be joined
- *)
- DPENUMSESSIONS_AVAILABLE = $00000001;
-
- (*
- * Enumerate all sessions even if they can't be joined.
- *)
- DPENUMSESSIONS_ALL = $00000002;
-
-
- (****************************************************************************
- *
- * GetCaps and GetPlayerCaps API flags
- *
- ****************************************************************************)
-
- (*
- * The latency returned should be for guaranteed message sending.
- * Default is non-guaranteed messaging.
- *)
- DPGETCAPS_GUARANTEED = $00000001;
-
-
- (****************************************************************************
- *
- * GetGroupData, GetPlayerData API flags
- * Remote and local Group/Player data is maintained separately.
- * Default is DPGET_REMOTE.
- *
- ****************************************************************************)
-
- (*
- * Get the remote data (set by any DirectPlay object in
- * the session using DPSET_REMOTE)
- *)
- DPGET_REMOTE = $00000000;
-
- (*
- * Get the local data (set by this DirectPlay object
- * using DPSET_LOCAL)
- *)
- DPGET_LOCAL = $00000001;
-
-
- (****************************************************************************
- *
- * Open API flags
- *
- ****************************************************************************)
-
- (*
- * Join the session that is described by the DPSESSIONDESC2 structure
- *)
- DPOPEN_JOIN = $00000001;
-
- (*
- * Create a new session as described by the DPSESSIONDESC2 structure
- *)
- DPOPEN_CREATE = $00000002;
-
- (****************************************************************************
- *
- * Receive API flags
- * Default is DPRECEIVE_ALL
- *
- ****************************************************************************)
-
- (*
- * Get the first message in the queue
- *)
- DPRECEIVE_ALL = $00000001;
-
- (*
- * Get the first message in the queue directed to a specific player
- *)
- DPRECEIVE_TOPLAYER = $00000002;
-
- (*
- * Get the first message in the queue from a specific player
- *)
- DPRECEIVE_FROMPLAYER = $00000004;
-
- (*
- * Get the message but don't remove it from the queue
- *)
- DPRECEIVE_PEEK = $00000008;
-
-
- (****************************************************************************
- *
- * Send API flags
- *
- ****************************************************************************)
-
- (*
- * Send the message using a guaranteed send method.
- * Default is non-guaranteed.
- *)
- DPSEND_GUARANTEED = $00000001;
-
- (*
- * Send the message high-priority. Move to front of
- * send queue of sender and the receive queue of the
- * receipient
- *)
- DPSEND_HIGHPRIORITY = $00000002;
-
- (*
- * Application will be sending several more guaranteed messages to
- * this player so the service provider may want to optimize for this.
- * Implementation of this flag by a service provider is optional.
- *)
- DPSEND_OPENSTREAM = $00000008;
-
- (*
- * The optimization requested by DPSEND_OPENSTREAM is no longer
- * needed. Resources allocated for DPSEND_OPENSTREAM may be released.
- *)
- DPSEND_CLOSESTREAM = $00000010;
-
-
- (****************************************************************************
- *
- * SetGroupData, SetGroupName, SetPlayerData, SetPlayerName,
- * SetSessionDesc API flags.
- * Default is DPSET_REMOTE.
- *
- ****************************************************************************)
-
- (*
- * Propagate the data to all players in the session
- *)
- DPSET_REMOTE = $00000000;
-
- (*
- * Do not propagate the data to other players
- *)
- DPSET_LOCAL = $00000001;
-
- (*
- * Used with DPSET_REMOTE, use guaranteed message send to
- * propagate the data
- *)
- DPSET_GUARANTEED = $00000002;
-
-
- (****************************************************************************
- *
- * DirectPlay system messages and message data structures
- *
- * All system message come 'From' player DPID_SYSMSG. To determine what type
- * of message it is, cast the lpData from Receive to DPMSG_GENERIC and check
- * the dwType member against one of the following DPSYS_xxx constants. Once
- * a match is found, cast the lpData to the corresponding of the DPMSG_xxx
- * structures to access the data of the message.
- *
- ****************************************************************************)
-
- (*
- * A new player or group has been created in the session
- * Use DPMSG_CREATEPLAYERORGROUP. Check dwPlayerType to see if it
- * is a player or a group.
- *)
- DPSYS_CREATEPLAYERORGROUP = $0003;
-
- (*
- * A player has been deleted from the session
- * Use DPMSG_DESTROYPLAYERORGROUP
- *)
- DPSYS_DESTROYPLAYERORGROUP = $0005;
-
- (*
- * A player has been added to a group
- * Use DPMSG_ADDPLAYERTOGROUP
- *)
- DPSYS_ADDPLAYERTOGROUP = $0007;
-
- (*
- * A player has been removed from a group
- * Use DPMSG_DELETEPLAYERFROMGROUP
- *)
- DPSYS_DELETEPLAYERFROMGROUP = $0021;
-
- (*
- * This DirectPlay object lost its connection with all the
- * other players in the session.
- * Use DPMSG_SESSIONLOST.
- *)
- DPSYS_SESSIONLOST = $0031;
-
- (*
- * The current host has left the session.
- * This DirectPlay object is now the host.
- * Use DPMSG_HOST.
- *)
- DPSYS_HOST = $0101;
-
- (*
- * The remote data associated with a player or
- * group has changed. Check dwPlayerType to see
- * if it is a player or a group
- * Use DPMSG_SETPLAYERORGROUPDATA
- *)
- DPSYS_SETPLAYERORGROUPDATA = $0102;
-
- (*
- * The name of a player or group has changed.
- * Check dwPlayerType to see if it is a player
- * or a group.
- * Use DPMSG_SETPLAYERORGROUPNAME
- *)
- DPSYS_SETPLAYERORGROUPNAME = $0103;
-
- (*
- * Used in the dwPlayerType field to indicate if it applies to a group
- * or a player
- *)
- DPPLAYERTYPE_GROUP = $00000000;
- DPPLAYERTYPE_PLAYER = $00000001;
-
- (*
- * DPMSG_GENERIC
- * Generic message structure used to identify the message type.
- *)
- type
- TDPMSG_GENERIC = record
- dwType: DWORD; // Message type
- end;
- PDPMSG_GENERIC = ^TDPMSG_GENERIC;
-
- (*
- * DPMSG_CREATEPLAYERORGROUP
- * System message generated when a new player or group
- * created in the session with information about it.
- *)
- TDPMSG_CREATEPLAYERORGROUP = record
- dwType: DWORD; // Message type
- dwPlayerType: DWORD; // Is it a player or group
- dpId: DPID; // ID of the player or group
- dwCurrentPlayers: DWORD; // current # players & groups in session
- lpData: Pointer; // pointer to remote data
- dwDataSize: DWORD; // size of remote data
- dpnName: TDPNAME; // structure with name info
- end;
- PDPMSG_CREATEPLAYERORGROUP = ^TDPMSG_CREATEPLAYERORGROUP;
-
- (*
- * DPMSG_DESTROYPLAYERORGROUP
- * System message generated when a player or group is being
- * destroyed in the session with information about it.
- *)
- TDPMSG_DESTROYPLAYERORGROUP = record
- dwType: DWORD; // Message type
- dwPlayerType: DWORD; // Is it a player or group
- dpId: DPID; // player ID being deleted
- lpLocalData: Pointer; // copy of players local data
- dwLocalDataSize: DWORD; // sizeof local data
- lpRemoteData: Pointer; // copy of players remote data
- dwRemoteDataSize: DWORD; // sizeof remote data
- end;
- PDPMSG_DESTROYPLAYERORGROUP = ^TDPMSG_DESTROYPLAYERORGROUP;
-
- (*
- * DPMSG_ADDPLAYERTOGROUP
- * System message generated when a player is being added
- * to a group.
- *)
- TDPMSG_ADDPLAYERTOGROUP = record
- dwType: DWORD; // Message type
- dpIdGroup: DPID; // group ID being added to
- dpIdPlayer: DPID; // player ID being added
- end;
- PDPMSG_ADDPLAYERTOGROUP = ^TDPMSG_ADDPLAYERTOGROUP;
-
- (*
- * DPMSG_DELETEPLAYERFROMGROUP
- * System message generated when a player is being
- * removed from a group
- *)
- TDPMSG_DELETEPLAYERFROMGROUP = TDPMSG_ADDPLAYERTOGROUP;
- PDPMSG_DELETEPLAYERFROMGROUP = ^TDPMSG_DELETEPLAYERFROMGROUP;
-
- (*
- * DPMSG_SETPLAYERORGROUPDATA
- * System message generated when remote data for a player or
- * group has changed.
- *)
- TDPMSG_SETPLAYERORGROUPDATA = record
- dwType: DWORD; // Message type
- dwPlayerType: DWORD; // Is it a player or group
- dpId: DPID; // ID of player or group
- lpData: Pointer; // pointer to remote data
- dwDataSize: DWORD; // size of remote data
- end;
- PDPMSG_SETPLAYERORGROUPDATA = ^TDPMSG_SETPLAYERORGROUPDATA;
-
- (*
- * DPMSG_SETPLAYERORGROUPNAME
- * System message generated when the name of a player or
- * group has changed.
- *)
- TDPMSG_SETPLAYERORGROUPNAME = record
- dwType: DWORD; // Message type
- dwPlayerType: DWORD; // Is it a player or group
- dpId: DPID; // ID of player or group
- dpnName: TDPNAME; // structure with new name info
- end;
- PDPMSG_SETPLAYERORGROUPNAME = ^TDPMSG_SETPLAYERORGROUPNAME;
-
- (*
- * DPMSG_HOST
- * System message generated when the host has migrated to this
- * DirectPlay object.
- *
- *)
- TDPMSG_HOST = TDPMSG_GENERIC;
- PDPMSG_HOST = ^TDPMSG_HOST;
-
- (*
- * DPMSG_SESSIONLOST
- * System message generated when the connection to the session is lost.
- *
- *)
- TDPMSG_SESSIONLOST = TDPMSG_GENERIC;
- PDPMSG_SESSIONLOST = ^TDPMSG_SESSIONLOST;
-
- (****************************************************************************
- *
- * DIRECTPLAY ERRORS
- *
- * Errors are represented by negative values and cannot be combined.
- *
- ****************************************************************************)
-
- const
- DP_OK = S_OK;
- DPERR_ALREADYINITIALIZED = $88770000 + 5;
- DPERR_ACCESSDENIED = $88770000 + 10;
- DPERR_ACTIVEPLAYERS = $88770000 + 20;
- DPERR_BUFFERTOOSMALL = $88770000 + 30;
- DPERR_CANTADDPLAYER = $88770000 + 40;
- DPERR_CANTCREATEGROUP = $88770000 + 50;
- DPERR_CANTCREATEPLAYER = $88770000 + 60;
- DPERR_CANTCREATESESSION = $88770000 + 70;
- DPERR_CAPSNOTAVAILABLEYET = $88770000 + 80;
- DPERR_EXCEPTION = $88770000 + 90;
- DPERR_GENERIC = E_FAIL;
- DPERR_INVALIDFLAGS = $88770000 + 120;
- DPERR_INVALIDOBJECT = $88770000 + 130;
- DPERR_INVALIDPARAM = E_INVALIDARG;
- DPERR_INVALIDPARAMS = DPERR_INVALIDPARAM;
- DPERR_INVALIDPLAYER = $88770000 + 150;
- DPERR_NOCAPS = $88770000 + 160;
- DPERR_NOCONNECTION = $88770000 + 170;
- DPERR_NOMEMORY = E_OUTOFMEMORY;
- DPERR_OUTOFMEMORY = DPERR_NOMEMORY;
- DPERR_NOMESSAGES = $88770000 + 190;
- DPERR_NONAMESERVERFOUND = $88770000 + 200;
- DPERR_NOPLAYERS = $88770000 + 210;
- DPERR_NOSESSIONS = $88770000 + 220;
- DPERR_SENDTOOBIG = $88770000 + 230;
- DPERR_TIMEOUT = $88770000 + 240;
- DPERR_UNAVAILABLE = $88770000 + 250;
- DPERR_UNSUPPORTED = E_NOTIMPL;
- DPERR_BUSY = $88770000 + 270;
- DPERR_USERCANCEL = $88770000 + 280;
- DPERR_NOINTERFACE = E_NOINTERFACE;
- DPERR_CANNOTCREATESERVER = $88770000 + 290;
- DPERR_PLAYERLOST = $88770000 + 300;
- DPERR_SESSIONLOST = $88770000 + 310;
-
- DPERR_BUFFERTOOLARGE = $88770000 + 1000;
- DPERR_CANTCREATEPROCESS = $88770000 + 1010;
- DPERR_APPNOTSTARTED = $88770000 + 1020;
- DPERR_INVALIDINTERFACE = $88770000 + 1030;
- DPERR_NOSERVICEPROVIDER = $88770000 + 1040;
- DPERR_UNKNOWNAPPLICATION = $88770000 + 1050;
- DPERR_NOTLOBBIED = $88770000 + 1070;
-
-
- (****************************************************************************
- *
- * dplay 1.0 obsolete structures + interfaces
- * Included for compatibility only. New apps should
- * use IDirectPlay2
- *
- ****************************************************************************)
- const
- DPOPEN_OPENSESSION = DPOPEN_JOIN;
- DPOPEN_CREATESESSION = DPOPEN_CREATE;
-
- DPENUMSESSIONS_PREVIOUS = $00000004;
-
- DPENUMPLAYERS_PREVIOUS = $00000004;
-
- DPSEND_GUARANTEE = DPSEND_GUARANTEED;
- DPSEND_TRYONCE = $00000004;
-
- DPCAPS_NAMESERVICE = $00000001;
- DPCAPS_NAMESERVER = DPCAPS_ISHOST;
- DPCAPS_GUARANTEED = $00000004;
-
- DPLONGNAMELEN = 52;
- DPSHORTNAMELEN = 20;
- DPSESSIONNAMELEN = 32;
- DPPASSWORDLEN = 16;
- DPUSERRESERVED = 16;
-
- DPSYS_ADDPLAYER = $0003;
- DPSYS_DELETEPLAYER = $0005;
-
- DPSYS_DELETEGROUP = $0020;
- DPSYS_DELETEPLAYERFROMGRP = $0021;
- DPSYS_CONNECT = $484b;
-
- type
- IDirectPlay = interface;
-
- TDPMSG_ADDPLAYER = packed record
- dwType: DWORD;
- dwPlayerType: DWORD;
- dpId: DPID;
- szLongName: Array [ 0..DPLONGNAMELEN-1 ] of char;
- szShortName: Array [ 0..DPSHORTNAMELEN-1 ] of char;
- dwCurrentPlayers: DWORD;
- end;
- TDPMSG_ADDGROUP = TDPMSG_ADDPLAYER;
-
- TDPMSG_GROUPADD = record
- dwType: DWORD;
- dpIdGroup: DPID;
- dpIdPlayer: DPID;
- end;
- TDPMSG_GROUPDELETE = TDPMSG_GROUPADD;
-
- TDPMSG_DELETEPLAYER = record
- dwType: DWORD;
- dpId: DPID;
- end;
-
- TDPENUMPLAYERSCALLBACK = function (dpId: DPID; lpFriendlyName: PChar;
- lpFormalName: PChar; dwFlags: DWORD; lpContext: Pointer): BOOL;
- stdcall;
-
- TDPSESSIONDESC = record
- dwSize: DWORD;
- guidSession: TGUID;
- dwSession: DWORD;
- dwMaxPlayers: DWORD;
- dwCurrentPlayers: DWORD;
- dwFlags: DWORD;
- szSessionName: Array [ 0..DPSESSIONNAMELEN-1 ] of char;
- szUserField: Array [ 0..DPUSERRESERVED-1 ] of char;
- dwReserved1: DWORD;
- szPassword: Array [ 0..DPPASSWORDLEN-1 ] of char;
- dwReserved2: DWORD;
- dwUser1: DWORD;
- dwUser2: DWORD;
- dwUser3: DWORD;
- dwUser4: DWORD;
- end;
- PDPSESSIONDESC = ^TDPSESSIONDESC;
-
- TDPENUMSESSIONSCALLBACK = function (var lpDPSessionDesc: TDPSESSIONDESC;
- lpContext: Pointer; var lpdwTimeOut: DWORD;
- dwFlags: DWORD): BOOL; stdcall;
-
- (*
- * IDirectPlay
- *)
- IDirectPlay = interface (IUnknown)
- ['{5454e9a0-db65-11ce-921c-00aa006c4972}']
- (*** IDirectPlay methods ***)
- function AddPlayerToGroup (pidGroup, pidPlayer: DPID): HRESULT; stdcall;
- function Close: HRESULT; stdcall;
- function CreatePlayer (var lppidID: DPID; lpPlayerFriendlyName: LPSTR;
- lpPlayerFormalName: LPSTR; lpEvent: PHandle): HRESULT; stdcall;
- function CreateGroup (var lppidID: DPID; lpGroupFriendlyName: LPSTR;
- lpGroupFormalName: LPSTR): HRESULT; stdcall;
- function DeletePlayerFromGroup (pidGroup, pidPlayer: DPID): HRESULT; stdcall;
- function DestroyPlayer (pidID: DPID): HRESULT; stdcall;
- function DestroyGroup (pidID: DPID): HRESULT; stdcall;
- function EnableNewPlayers (bEnable: BOOL): HRESULT; stdcall;
- function EnumGroupPlayers (pidGroupPID: DPID;
- lpEnumPlayersCallback: TDPENUMPLAYERSCALLBACK;
- lpContext: Pointer; dwFlags: DWORD): HRESULT; stdcall;
- function EnumGroups (dwSessionID: DWORD;
- lpEnumPlayersCallback: TDPENUMPLAYERSCALLBACK; lpContext: Pointer;
- dwFlags: DWORD): HRESULT; stdcall;
- function EnumPlayers (dwSessionId: DWORD;
- lpEnumPlayersCallback: TDPENUMPLAYERSCALLBACK; lpContext: Pointer;
- dwFlags: DWORD): HRESULT; stdcall;
- function EnumSessions (const lpSDesc: TDPSESSIONDESC; dwTimeout: DWORD;
- lpEnumSessionsCallback: TDPENUMSESSIONSCALLBACK; lpContext: Pointer;
- dwFlags: DWORD): HRESULT; stdcall;
- function GetCaps (const lpDPCaps: TDPCAPS): HRESULT; stdcall;
- function GetMessageCount (pidID: DPID; var lpdwCount: DWORD): HRESULT;
- stdcall;
- function GetPlayerCaps (pidID: DPID;
- const lpDPPlayerCaps: TDPCAPS): HRESULT; stdcall;
- function GetPlayerName (pidID: DPID; lpPlayerFriendlyName: LPSTR;
- var lpdwFriendlyNameLength: DWORD; lpPlayerFormalName: LPSTR;
- var lpdwFormalNameLength: DWORD): HRESULT; stdcall;
- function Initialize (const IID: TGUID): HRESULT; stdcall;
- function Open (const lpSDesc: TDPSESSIONDESC): HRESULT; stdcall;
- function Receive (var lppidFrom, lppidTo: DPID; dwFlags: DWORD;
- lpvBuffer: Pointer; var lpdwSize: DWORD): HRESULT; stdcall;
- (*** Warning! SaveSession is defined differently in the header files
- and the online documentation ***)
- function SaveSession (lpSessionName: LPSTR): HRESULT; stdcall;
- function Send (pidFrom: DPID; pidTo: DPID; dwFlags: DWORD;
- lpvBuffer: Pointer; dwBuffSize: DWORD): HRESULT; stdcall;
- function SetPlayerName (pidID: DPID; lpPlayerFriendlyName: LPSTR;
- lpPlayerFormalName: LPSTR): HRESULT; stdcall;
- end;
-
- function DirectPlayEnumerate (lpEnumDPCallback: TDPENUMDPCALLBACK;
- lpContext: Pointer): HRESULT; stdcall;
- function DirectPlayCreate (const ServiceProvider: TGUID; out DP: IDirectPlay;
- pUnk: IUnknown): HRESULT; stdcall;
-
-
- {------------- Direct 3D ----------------------}
-
- { from d3dtypes.h }
-
- type
- TD3DVALUE = single;
- TD3DFIXED = LongInt;
-
- (*
- * Format of CI colors is
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | alpha | color index | fraction |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *)
-
- // #define CI_GETALPHA(ci) ((ci) >> 24)
- // #define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff)
- // #define CI_GETFRACTION(ci) ((ci) & 0xff)
- // #define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80)
- // #define CI_MASKALPHA(ci) ((ci) & 0xffffff)
- // #define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f))
-
- (*
- * Format of RGBA colors is
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | alpha | red | green | blue |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *)
-
- // #define RGBA_GETALPHA(rgb) ((rgb) >> 24)
- // #define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff)
- // #define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
- // #define RGBA_GETBLUE(rgb) ((rgb) & 0xff)
- // #define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
-
- (* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs
- * The float values must be in the range 0..1
- *)
-
- // #define D3DRGB(r, g, b) \
- // (0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
- // #define D3DRGBA(r, g, b, a) \
- // ( (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
- // | (((long)((g) * 255)) << 8) | (long)((b) * 255) \
- // )
-
- (*
- * Format of RGB colors is
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | ignored | red | green | blue |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *)
-
- // #define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff)
- // #define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
- // #define RGB_GETBLUE(rgb) ((rgb) & 0xff)
- // #define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff))
- // #define RGB_MAKE(r, g, b) ((D3DCOLOR) (((r) << 16) | ((g) << 8) | (b)))
- // #define RGBA_TORGB(rgba) ((D3DCOLOR) ((rgba) & 0xffffff))
- // #define RGB_TORGBA(rgb) ((D3DCOLOR) ((rgb) | 0xff000000))
-
- const
- D3DENUMRET_CANCEL = DDENUMRET_CANCEL;
- D3DENUMRET_OK = DDENUMRET_OK;
-
- type
- TD3DVALIDATECALLBACK = function ( lpUserArg: Pointer;
- dwOffset: DWORD ): HRESULT; stdcall;
- TD3DENUMTEXTUREFORMATSCALLBACK = function ( const Ddsd: TDDSURFACEDESC;
- lpUserArg: Pointer ): HRESULT; stdcall;
-
- TD3DCOLOR = DWORD;
- TD3DMATERIALHANDLE = DWORD;
- TD3DTEXTUREHANDLE = DWORD;
- TD3DMATRIXHANDLE = DWORD;
-
- TD3DCOLORVALUE = record
- case Integer of
- 0: (
- r: TD3DVALUE;
- g: TD3DVALUE;
- b: TD3DVALUE;
- a: TD3DVALUE;
- );
- 1: (
- dvR: TD3DVALUE;
- dvG: TD3DVALUE;
- dvB: TD3DVALUE;
- dvA: TD3DVALUE;
- );
- end;
-
- TD3DRECT = record
- case Integer of
- 0: (
- x1: LongInt;
- y1: LongInt;
- x2: LongInt;
- y2: LongInt;
- );
- 1: (
- lX1: LongInt;
- lY1: LongInt;
- lX2: LongInt;
- lY2: LongInt;
- );
- end;
- PD3DRECT = ^TD3DRECT;
-
- TD3DVECTOR = record
- case Integer of
- 0: (
- x: TD3DVALUE;
- y: TD3DVALUE;
- z: TD3DVALUE;
- );
- 1: (
- dvX: TD3DVALUE;
- dvY: TD3DVALUE;
- dvZ: TD3DVALUE;
- );
- end;
- PD3DVECTOR = ^TD3DVECTOR;
-
-
- (*
- * Vertex data types supported in an ExecuteBuffer.
- *)
-
- (*
- * Homogeneous vertices
- *)
-
- TD3DHVERTEX = record
- dwFlags: DWORD; (* Homogeneous clipping flags *)
- case Integer of
- 0: (
- hx: TD3DVALUE;
- hy: TD3DVALUE;
- hz: TD3DVALUE;
- );
- 1: (
- dvHX: TD3DVALUE;
- dvHY: TD3DVALUE;
- dvHZ: TD3DVALUE;
- );
- end;
- PD3DHVERTEX = ^TD3DHVERTEX;
-
- (*
- * Transformed/lit vertices
- *)
-
- TD3DTLVERTEX = record
- case Integer of
- 0: (
- sx: TD3DVALUE; (* Screen coordinates *)
- sy: TD3DVALUE;
- sz: TD3DVALUE;
- rhw: TD3DVALUE; (* Reciprocal of homogeneous w *)
- color: TD3DCOLOR; (* Vertex color *)
- specular: TD3DCOLOR; (* Specular component of vertex *)
- tu: TD3DVALUE; (* Texture coordinates *)
- tv: TD3DVALUE;
- );
- 1: (
- dvSX: TD3DVALUE;
- dvSY: TD3DVALUE;
- dvSZ: TD3DVALUE;
- dvRHW: TD3DVALUE;
- dcColor: TD3DCOLOR;
- dcSpecular: TD3DCOLOR;
- dvTU: TD3DVALUE;
- dvTV: TD3DVALUE;
- );
- end;
- PD3DTLVERTEX = ^TD3DTLVERTEX;
-
- (*
- * Untransformed/lit vertices
- *)
-
- TD3DLVERTEX = record
- case Integer of
- 0: (
- x: TD3DVALUE; (* Homogeneous coordinates *)
- y: TD3DVALUE;
- z: TD3DVALUE;
- dwReserved: DWORD;
- color: TD3DCOLOR; (* Vertex color *)
- specular: TD3DCOLOR; (* Specular component of vertex *)
- tu: TD3DVALUE; (* Texture coordinates *)
- tv: TD3DVALUE;
- );
- 1: (
- dvX: TD3DVALUE;
- dvY: TD3DVALUE;
- dvZ: TD3DVALUE;
- UNIONFILLER1d: DWORD;
- dcColor: TD3DCOLOR;
- dcSpecular: TD3DCOLOR;
- dvTU: TD3DVALUE;
- dvTV: TD3DVALUE;
- );
- end;
-
- (*
- * Untransformed/unlit vertices
- *)
-
- TD3DVERTEX = record
- case Integer of
- 0: (
- x: TD3DVALUE; (* Homogeneous coordinates *)
- y: TD3DVALUE;
- z: TD3DVALUE;
- nx: TD3DVALUE; (* Normal *)
- ny: TD3DVALUE;
- nz: TD3DVALUE;
- tu: TD3DVALUE; (* Texture coordinates *)
- tv: TD3DVALUE;
- );
- 1: (
- dvX: TD3DVALUE;
- dvY: TD3DVALUE;
- dvZ: TD3DVALUE;
- dvNX: TD3DVALUE;
- dvNY: TD3DVALUE;
- dvNZ: TD3DVALUE;
- dvTU: TD3DVALUE;
- dvTV: TD3DVALUE;
- );
- end;
-
- (*
- * Matrix, viewport, and tranformation structures and definitions.
- *)
-
- TD3DMATRIX = record
- _11, _12, _13, _14: TD3DVALUE;
- _21, _22, _23, _24: TD3DVALUE;
- _31, _32, _33, _34: TD3DVALUE;
- _41, _42, _43, _44: TD3DVALUE;
- end;
-
- TD3DVIEWPORT = record
- dwSize: DWORD;
- dwX: DWORD;
- dwY: DWORD; (* Top left *)
- dwWidth: DWORD;
- dwHeight: DWORD; (* Dimensions *)
- dvScaleX: TD3DVALUE; (* Scale homogeneous to screen *)
- dvScaleY: TD3DVALUE; (* Scale homogeneous to screen *)
- dvMaxX: TD3DVALUE; (* Min/max homogeneous x coord *)
- dvMaxY: TD3DVALUE; (* Min/max homogeneous y coord *)
- dvMinZ: TD3DVALUE;
- dvMaxZ: TD3DVALUE; (* Min/max homogeneous z coord *)
- end;
-
- (*
- * Values for clip fields.
- *)
-
- const
- D3DCLIP_LEFT = $00000001;
- D3DCLIP_RIGHT = $00000002;
- D3DCLIP_TOP = $00000004;
- D3DCLIP_BOTTOM = $00000008;
- D3DCLIP_FRONT = $00000010;
- D3DCLIP_BACK = $00000020;
- D3DCLIP_GEN0 = $00000040;
- D3DCLIP_GEN1 = $00000080;
- D3DCLIP_GEN2 = $00000100;
- D3DCLIP_GEN3 = $00000200;
- D3DCLIP_GEN4 = $00000400;
- D3DCLIP_GEN5 = $00000800;
-
- (*
- * Values for d3d status.
- *)
-
- D3DSTATUS_CLIPUNIONLEFT = D3DCLIP_LEFT;
- D3DSTATUS_CLIPUNIONRIGHT = D3DCLIP_RIGHT;
- D3DSTATUS_CLIPUNIONTOP = D3DCLIP_TOP;
- D3DSTATUS_CLIPUNIONBOTTOM = D3DCLIP_BOTTOM;
- D3DSTATUS_CLIPUNIONFRONT = D3DCLIP_FRONT;
- D3DSTATUS_CLIPUNIONBACK = D3DCLIP_BACK;
- D3DSTATUS_CLIPUNIONGEN0 = D3DCLIP_GEN0;
- D3DSTATUS_CLIPUNIONGEN1 = D3DCLIP_GEN1;
- D3DSTATUS_CLIPUNIONGEN2 = D3DCLIP_GEN2;
- D3DSTATUS_CLIPUNIONGEN3 = D3DCLIP_GEN3;
- D3DSTATUS_CLIPUNIONGEN4 = D3DCLIP_GEN4;
- D3DSTATUS_CLIPUNIONGEN5 = D3DCLIP_GEN5;
-
- D3DSTATUS_CLIPINTERSECTIONLEFT = $00001000;
- D3DSTATUS_CLIPINTERSECTIONRIGHT = $00002000;
- D3DSTATUS_CLIPINTERSECTIONTOP = $00004000;
- D3DSTATUS_CLIPINTERSECTIONBOTTOM = $00008000;
- D3DSTATUS_CLIPINTERSECTIONFRONT = $00010000;
- D3DSTATUS_CLIPINTERSECTIONBACK = $00020000;
- D3DSTATUS_CLIPINTERSECTIONGEN0 = $00040000;
- D3DSTATUS_CLIPINTERSECTIONGEN1 = $00080000;
- D3DSTATUS_CLIPINTERSECTIONGEN2 = $00100000;
- D3DSTATUS_CLIPINTERSECTIONGEN3 = $00200000;
- D3DSTATUS_CLIPINTERSECTIONGEN4 = $00400000;
- D3DSTATUS_CLIPINTERSECTIONGEN5 = $00800000;
- D3DSTATUS_ZNOTVISIBLE = $01000000;
-
- D3DSTATUS_CLIPUNIONALL = (
- D3DSTATUS_CLIPUNIONLEFT or
- D3DSTATUS_CLIPUNIONRIGHT or
- D3DSTATUS_CLIPUNIONTOP or
- D3DSTATUS_CLIPUNIONBOTTOM or
- D3DSTATUS_CLIPUNIONFRONT or
- D3DSTATUS_CLIPUNIONBACK or
- D3DSTATUS_CLIPUNIONGEN0 or
- D3DSTATUS_CLIPUNIONGEN1 or
- D3DSTATUS_CLIPUNIONGEN2 or
- D3DSTATUS_CLIPUNIONGEN3 or
- D3DSTATUS_CLIPUNIONGEN4 or
- D3DSTATUS_CLIPUNIONGEN5 );
-
- D3DSTATUS_CLIPINTERSECTIONALL = (
- D3DSTATUS_CLIPINTERSECTIONLEFT or
- D3DSTATUS_CLIPINTERSECTIONRIGHT or
- D3DSTATUS_CLIPINTERSECTIONTOP or
- D3DSTATUS_CLIPINTERSECTIONBOTTOM or
- D3DSTATUS_CLIPINTERSECTIONFRONT or
- D3DSTATUS_CLIPINTERSECTIONBACK or
- D3DSTATUS_CLIPINTERSECTIONGEN0 or
- D3DSTATUS_CLIPINTERSECTIONGEN1 or
- D3DSTATUS_CLIPINTERSECTIONGEN2 or
- D3DSTATUS_CLIPINTERSECTIONGEN3 or
- D3DSTATUS_CLIPINTERSECTIONGEN4 or
- D3DSTATUS_CLIPINTERSECTIONGEN5 );
-
- D3DSTATUS_DEFAULT = (
- D3DSTATUS_CLIPINTERSECTIONALL or
- D3DSTATUS_ZNOTVISIBLE );
-
- (*
- * Options for direct transform calls
- *)
-
- D3DTRANSFORM_CLIPPED = $00000001;
- D3DTRANSFORM_UNCLIPPED = $00000002;
-
- type
- TD3DTRANSFORMDATA = record
- dwSize: DWORD;
- lpIn: Pointer; (* Input vertices *)
- dwInSize: DWORD; (* Stride of input vertices *)
- lpOut: Pointer; (* Output vertices *)
- dwOutSize: DWORD; (* Stride of output vertices *)
- lpHOut: PD3DHVERTEX; (* Output homogeneous vertices *)
- dwClip: DWORD; (* Clipping hint *)
- dwClipIntersection: DWORD;
- dwClipUnion: DWORD; (* Union of all clip flags *)
- drExtent: TD3DRECT; (* Extent of transformed vertices *)
- end;
-
- (*
- * Structure defining position and direction properties for lighting.
- *)
-
- TD3DLIGHTINGELEMENT = record
- dvPosition: TD3DVECTOR; (* Lightable point in model space *)
- dvNormal: TD3DVECTOR; (* Normalised unit vector *)
- end;
- PD3DLIGHTINGELEMENT = ^TD3DLIGHTINGELEMENT;
-
- (*
- * Structure defining material properties for lighting.
- *)
-
- TD3DMATERIAL = record
- dwSize: DWORD;
- case Integer of
- 0: (
- diffuse: TD3DCOLORVALUE; (* Diffuse color RGBA *)
- ambient: TD3DCOLORVALUE; (* Ambient color RGB *)
- specular: TD3DCOLORVALUE; (* Specular 'shininess' *)
- emissive: TD3DCOLORVALUE; (* Emissive color RGB *)
- power: TD3DVALUE; (* Sharpness if specular highlight *)
- hTexture: TD3DTEXTUREHANDLE; (* Handle to texture map *)
- dwRampSize: DWORD;
- );
- 1: (
- dcvDiffuse: TD3DCOLORVALUE;
- dcvAmbient: TD3DCOLORVALUE;
- dcvSpecular: TD3DCOLORVALUE;
- dcvEmissive: TD3DCOLORVALUE;
- dvPower: TD3DVALUE;
- );
- end;
- PD3DMATERIAL = ^TD3DMATERIAL;
-
- TD3DLIGHTTYPE = (
- D3DLIGHT_INVALID_0,
- D3DLIGHT_POINT,
- D3DLIGHT_SPOT,
- D3DLIGHT_DIRECTIONAL,
- D3DLIGHT_PARALLELPOINT,
- D3DLIGHT_GLSPOT );
-
- (*
- * Structure defining a light source and its properties.
- *)
-
- TD3DLIGHT = record
- dwSize: DWORD;
- dltType: TD3DLIGHTTYPE; (* Type of light source *)
- dcvColor: TD3DCOLORVALUE; (* Color of light *)
- dvPosition: TD3DVECTOR; (* Position in world space *)
- dvDirection: TD3DVECTOR; (* Direction in world space *)
- dvRange: TD3DVALUE; (* Cutoff range *)
- dvFalloff: TD3DVALUE; (* Falloff *)
- dvAttenuation0: TD3DVALUE; (* Constant attenuation *)
- dvAttenuation1: TD3DVALUE; (* Linear attenuation *)
- dvAttenuation2: TD3DVALUE; (* Quadratic attenuation *)
- dvTheta: TD3DVALUE; (* Inner angle of spotlight cone *)
- dvPhi: TD3DVALUE; (* Outer angle of spotlight cone *)
- end;
-
- TD3DLIGHTDATA = record
- dwSize: DWORD;
- lpIn: PD3DLIGHTINGELEMENT; (* Input positions and normals *)
- dwInSize: DWORD; (* Stride of input elements *)
- lpOut: PD3DTLVERTEX; (* Output colors *)
- dwOutSize: DWORD; (* Stride of output colors *)
- end;
-
- TD3DCOLORMODEL = (
- D3DCOLOR_INVALID_0,
- D3DCOLOR_MONO,
- D3DCOLOR_RGB );
-
- (*
- * Options for clearing
- *)
-
- const
- D3DCLEAR_TARGET = $00000001; (* Clear target surface *)
- D3DCLEAR_ZBUFFER = $00000002; (* Clear target z buffer *)
-
- (*
- * Execute buffers are allocated via Direct3D. These buffers may then
- * be filled by the application with instructions to execute along with
- * vertex data.
- *)
-
- (*
- * Supported op codes for execute instructions.
- *)
-
- type
- TD3DOPCODE = (
- D3DOP_INVALID_0,
- D3DOP_POINT,
- D3DOP_LINE,
- D3DOP_TRIANGLE,
- D3DOP_MATRIXLOAD,
- D3DOP_MATRIXMULTIPLY,
- D3DOP_STATETRANSFORM,
- D3DOP_STATELIGHT,
- D3DOP_STATERENDER,
- D3DOP_PROCESSVERTICES,
- D3DOP_TEXTURELOAD,
- D3DOP_EXIT,
- D3DOP_BRANCHFORWARD,
- D3DOP_SPAN,
- D3DOP_SETSTATUS );
-
- TD3DINSTRUCTION = record
- bOpcode: BYTE; (* Instruction opcode *)
- bSize: BYTE; (* Size of each instruction data unit *)
- wCount: WORD; (* Count of instruction data units to follow *)
- end;
-
- (*
- * Structure for texture loads
- *)
-
- TD3DTEXTURELOAD = record
- hDestTexture: TD3DTEXTUREHANDLE;
- hSrcTexture: TD3DTEXTUREHANDLE;
- end;
-
- (*
- * Structure for picking
- *)
-
- TD3DPICKRECORD = record
- bOpcode: BYTE;
- bPad: BYTE;
- dwOffset: DWORD;
- dvZ: TD3DVALUE;
- end;
- PD3DPICKRECORD = ^TD3DPICKRECORD;
-
- (*
- * The following defines the rendering states which can be set in the
- * execute buffer.
- *)
-
- TD3DSHADEMODE = (
- D3DSHADE_INVALID_0,
- D3DSHADE_FLAT,
- D3DSHADE_GOURAUD,
- D3DSHADE_PHONG );
-
- TD3DFILLMODE = (
- D3DFILL_INVALID_0,
- D3DFILL_POINT,
- D3DFILL_WIREFRAME,
- D3DFILL_SOLID );
-
- TD3DLINEPATTERN = record
- wRepeatFactor: WORD;
- wLinePattern: WORD;
- end;
-
- TD3DTEXTUREFILTER = (
- D3DFILTER_INVALID_0,
- D3DFILTER_NEAREST,
- D3DFILTER_LINEAR,
- D3DFILTER_MIPNEAREST,
- D3DFILTER_MIPLINEAR,
- D3DFILTER_LINEARMIPNEAREST,
- D3DFILTER_LINEARMIPLINEAR );
-
- TD3DBLEND = (
- D3DBLEND_INVALID_0,
- D3DBLEND_ZERO,
- D3DBLEND_ONE,
- D3DBLEND_SRCCOLOR,
- D3DBLEND_INVSRCCOLOR,
- D3DBLEND_SRCALPHA,
- D3DBLEND_INVSRCALPHA,
- D3DBLEND_DESTALPHA,
- D3DBLEND_INVDESTALPHA,
- D3DBLEND_DESTCOLOR,
- D3DBLEND_INVDESTCOLOR,
- D3DBLEND_SRCALPHASAT,
- D3DBLEND_BOTHSRCALPHA,
- D3DBLEND_BOTHINVSRCALPHA );
-
- TD3DTEXTUREBLEND = (
- D3DTBLEND_INVALID_0,
- D3DTBLEND_DECAL,
- D3DTBLEND_MODULATE,
- D3DTBLEND_DECALALPHA,
- D3DTBLEND_MODULATEALPHA,
- D3DTBLEND_DECALMASK,
- D3DTBLEND_MODULATEMASK,
- D3DTBLEND_COPY );
-
- TD3DTEXTUREADDRESS = (
- D3DTADDRESS_INVALID_0,
- D3DTADDRESS_WRAP,
- D3DTADDRESS_MIRROR,
- D3DTADDRESS_CLAMP );
-
- TD3DCULL = (
- D3DCULL_INVALID_0,
- D3DCULL_NONE,
- D3DCULL_CW,
- D3DCULL_CCW );
-
- TD3DCMPFUNC = (
- D3DCMP_INVALID_0,
- D3DCMP_NEVER,
- D3DCMP_LESS,
- D3DCMP_EQUAL,
- D3DCMP_LESSEQUAL,
- D3DCMP_GREATER,
- D3DCMP_NOTEQUAL,
- D3DCMP_GREATEREQUAL,
- D3DCMP_ALWAYS );
-
- TD3DFOGMODE = (
- D3DFOG_NONE,
- D3DFOG_EXP,
- D3DFOG_EXP2,
- D3DFOG_LINEAR );
-
- (*
- * Amount to add to a state to generate the override for that state.
- *)
-
- const
- D3DSTATE_OVERRIDE_BIAS = 256;
-
- type
- TD3DTRANSFORMSTATETYPE = (
- D3DTRANSFORMSTATE_INVALID_0,
- D3DTRANSFORMSTATE_WORLD,
- D3DTRANSFORMSTATE_VIEW,
- D3DTRANSFORMSTATE_PROJECTION );
-
- TD3DLIGHTSTATETYPE = (
- D3DLIGHTSTATE_INVALID_0,
- D3DLIGHTSTATE_MATERIAL,
- D3DLIGHTSTATE_AMBIENT,
- D3DLIGHTSTATE_COLORMODEL,
- D3DLIGHTSTATE_FOGMODE,
- D3DLIGHTSTATE_FOGSTART,
- D3DLIGHTSTATE_FOGEND,
- D3DLIGHTSTATE_FOGDENSITY );
-
- TD3DRENDERSTATETYPE = (
- D3DRENDERSTATE_INVALID_0,
- D3DRENDERSTATE_TEXTUREHANDLE, (* Texture handle *)
- D3DRENDERSTATE_ANTIALIAS, (* Antialiasing prim edges *)
- D3DRENDERSTATE_TEXTUREADDRESS, (* D3DTEXTUREADDRESS *)
- D3DRENDERSTATE_TEXTUREPERSPECTIVE, (* TRUE for perspective correction *)
- D3DRENDERSTATE_WRAPU, (* TRUE for wrapping in u *)
- D3DRENDERSTATE_WRAPV, (* TRUE for wrapping in v *)
- D3DRENDERSTATE_ZENABLE, (* TRUE to enable z test *)
- D3DRENDERSTATE_FILLMODE, (* D3DFILL_MODE *)
- D3DRENDERSTATE_SHADEMODE, (* D3DSHADEMODE *)
- D3DRENDERSTATE_LINEPATTERN, (* D3DLINEPATTERN *)
- D3DRENDERSTATE_MONOENABLE, (* TRUE to enable mono rasterization *)
- D3DRENDERSTATE_ROP2, (* ROP2 *)
- D3DRENDERSTATE_PLANEMASK, (* DWORD physical plane mask *)
- D3DRENDERSTATE_ZWRITEENABLE, (* TRUE to enable z writes *)
- D3DRENDERSTATE_ALPHATESTENABLE, (* TRUE to enable alpha tests *)
- D3DRENDERSTATE_LASTPIXEL, (* TRUE for last-pixel on lines *)
- D3DRENDERSTATE_TEXTUREMAG, (* D3DTEXTUREFILTER *)
- D3DRENDERSTATE_TEXTUREMIN, (* D3DTEXTUREFILTER *)
- D3DRENDERSTATE_SRCBLEND, (* D3DBLEND *)
- D3DRENDERSTATE_DESTBLEND, (* D3DBLEND *)
- D3DRENDERSTATE_TEXTUREMAPBLEND, (* D3DTEXTUREBLEND *)
- D3DRENDERSTATE_CULLMODE, (* D3DCULL *)
- D3DRENDERSTATE_ZFUNC, (* D3DCMPFUNC *)
- D3DRENDERSTATE_ALPHAREF, (* D3DFIXED *)
- D3DRENDERSTATE_ALPHAFUNC, (* D3DCMPFUNC *)
- D3DRENDERSTATE_DITHERENABLE, (* TRUE to enable dithering *)
- D3DRENDERSTATE_BLENDENABLE, (* TRUE to enable alpha blending *)
- D3DRENDERSTATE_FOGENABLE, (* TRUE to enable fog *)
- D3DRENDERSTATE_SPECULARENABLE, (* TRUE to enable specular *)
- D3DRENDERSTATE_ZVISIBLE, (* TRUE to enable z checking *)
- D3DRENDERSTATE_SUBPIXEL, (* TRUE to enable subpixel correction *)
- D3DRENDERSTATE_SUBPIXELX, (* TRUE to enable correction in X only *)
- D3DRENDERSTATE_STIPPLEDALPHA, (* TRUE to enable stippled alpha *)
- D3DRENDERSTATE_FOGCOLOR, (* D3DCOLOR *)
- D3DRENDERSTATE_FOGTABLEMODE, (* D3DFOGMODE *)
- D3DRENDERSTATE_FOGTABLESTART, (* Fog table start *)
- D3DRENDERSTATE_FOGTABLEEND, (* Fog table end *)
- D3DRENDERSTATE_FOGTABLEDENSITY, (* Fog table density *)
- D3DRENDERSTATE_STIPPLEENABLE, (* TRUE to enable stippling *)
- D3DRENDERSTATE_INVALID_40,
- D3DRENDERSTATE_INVALID_41,
- D3DRENDERSTATE_INVALID_42,
- D3DRENDERSTATE_INVALID_43,
- D3DRENDERSTATE_INVALID_44,
- D3DRENDERSTATE_INVALID_45,
- D3DRENDERSTATE_INVALID_46,
- D3DRENDERSTATE_INVALID_47,
- D3DRENDERSTATE_INVALID_48,
- D3DRENDERSTATE_INVALID_49,
- D3DRENDERSTATE_INVALID_50,
- D3DRENDERSTATE_INVALID_51,
- D3DRENDERSTATE_INVALID_52,
- D3DRENDERSTATE_INVALID_53,
- D3DRENDERSTATE_INVALID_54,
- D3DRENDERSTATE_INVALID_55,
- D3DRENDERSTATE_INVALID_56,
- D3DRENDERSTATE_INVALID_57,
- D3DRENDERSTATE_INVALID_58,
- D3DRENDERSTATE_INVALID_59,
- D3DRENDERSTATE_INVALID_60,
- D3DRENDERSTATE_INVALID_61,
- D3DRENDERSTATE_INVALID_62,
- D3DRENDERSTATE_INVALID_63,
- D3DRENDERSTATE_STIPPLEPATTERN00, (* Stipple pattern 01... *)
- D3DRENDERSTATE_STIPPLEPATTERN01,
- D3DRENDERSTATE_STIPPLEPATTERN02,
- D3DRENDERSTATE_STIPPLEPATTERN03,
- D3DRENDERSTATE_STIPPLEPATTERN04,
- D3DRENDERSTATE_STIPPLEPATTERN05,
- D3DRENDERSTATE_STIPPLEPATTERN06,
- D3DRENDERSTATE_STIPPLEPATTERN07,
- D3DRENDERSTATE_STIPPLEPATTERN08,
- D3DRENDERSTATE_STIPPLEPATTERN09,
- D3DRENDERSTATE_STIPPLEPATTERN10,
- D3DRENDERSTATE_STIPPLEPATTERN11,
- D3DRENDERSTATE_STIPPLEPATTERN12,
- D3DRENDERSTATE_STIPPLEPATTERN13,
- D3DRENDERSTATE_STIPPLEPATTERN14,
- D3DRENDERSTATE_STIPPLEPATTERN15,
- D3DRENDERSTATE_STIPPLEPATTERN16,
- D3DRENDERSTATE_STIPPLEPATTERN17,
- D3DRENDERSTATE_STIPPLEPATTERN18,
- D3DRENDERSTATE_STIPPLEPATTERN19,
- D3DRENDERSTATE_STIPPLEPATTERN20,
- D3DRENDERSTATE_STIPPLEPATTERN21,
- D3DRENDERSTATE_STIPPLEPATTERN22,
- D3DRENDERSTATE_STIPPLEPATTERN23,
- D3DRENDERSTATE_STIPPLEPATTERN24,
- D3DRENDERSTATE_STIPPLEPATTERN25,
- D3DRENDERSTATE_STIPPLEPATTERN26,
- D3DRENDERSTATE_STIPPLEPATTERN27,
- D3DRENDERSTATE_STIPPLEPATTERN28,
- D3DRENDERSTATE_STIPPLEPATTERN29,
- D3DRENDERSTATE_STIPPLEPATTERN30,
- D3DRENDERSTATE_STIPPLEPATTERN31 );
-
- TD3DSTATE = record
- case Integer of
- 0: (
- dtstTransformStateType: TD3DTRANSFORMSTATETYPE;
- dwArg: Array [ 0..0 ] of DWORD;
- );
- 1: (
- dlstLightStateType: TD3DLIGHTSTATETYPE;
- dvArg: Array [ 0..0 ] of TD3DVALUE;
- );
- 2: (
- drstRenderStateType: TD3DRENDERSTATETYPE;
- );
- end;
-
- (*
- * Operation used to load matrices
- * hDstMat = hSrcMat
- *)
-
- TD3DMATRIXLOAD = record
- hDestMatrix: TD3DMATRIXHANDLE; (* Destination matrix *)
- hSrcMatrix: TD3DMATRIXHANDLE; (* Source matrix *)
- end;
-
- (*
- * Operation used to multiply matrices
- * hDstMat = hSrcMat1 * hSrcMat2
- *)
-
- TD3DMATRIXMULTIPLY = record
- hDestMatrix: TD3DMATRIXHANDLE; (* Destination matrix *)
- hSrcMatrix1: TD3DMATRIXHANDLE; (* First source matrix *)
- hSrcMatrix2: TD3DMATRIXHANDLE; (* Second source matrix *)
- end;
-
- (*
- * Operation used to transform and light vertices.
- *)
-
- TD3DPROCESSVERTICES = record
- dwFlags: DWORD; (* Do we transform or light or just copy? *)
- wStart: WORD; (* Index to first vertex in source *)
- wDest: WORD; (* Index to first vertex in local buffer *)
- dwCount: DWORD; (* Number of vertices to be processed *)
- dwReserved: DWORD; (* Must be zero *)
- end;
-
- const
- D3DPROCESSVERTICES_TRANSFORMLIGHT = $00000000;
- D3DPROCESSVERTICES_TRANSFORM = $00000001;
- D3DPROCESSVERTICES_COPY = $00000002;
- D3DPROCESSVERTICES_OPMASK = $00000007;
-
- D3DPROCESSVERTICES_UPDATEEXTENTS = $00000008;
- D3DPROCESSVERTICES_NOCOLOR = $00000010;
-
- (*
- * Triangle flags
- *)
-
- (*
- * Tri strip and fan flags.
- * START loads all three vertices
- * EVEN and ODD load just v3 with even or odd culling
- * START_FLAT contains a count from 0 to 29 that allows the
- * whole strip or fan to be culled in one hit.
- * e.g. for a quad len = 1
- *)
-
- D3DTRIFLAG_START = $00000000;
- // #define D3DTRIFLAG_STARTFLAT(len) (len) (* 0 < len < 30 *)
- D3DTRIFLAG_ODD = $0000001e;
- D3DTRIFLAG_EVEN = $0000001f;
-
- (*
- * Triangle edge flags
- * enable edges for wireframe or antialiasing
- *)
-
- D3DTRIFLAG_EDGEENABLE1 = $00000100; (* v0-v1 edge *)
- D3DTRIFLAG_EDGEENABLE2 = $00000200; (* v1-v2 edge *)
- D3DTRIFLAG_EDGEENABLE3 = $00000400; (* v2-v0 edge *)
- D3DTRIFLAG_EDGEENABLETRIANGLE = (
- D3DTRIFLAG_EDGEENABLE1 or D3DTRIFLAG_EDGEENABLE2 or D3DTRIFLAG_EDGEENABLE3 );
-
- (*
- * Primitive structures and related defines. Vertex offsets are to types
- * D3DVERTEX, D3DLVERTEX, or D3DTLVERTEX.
- *)
-
- (*
- * Triangle list primitive structure
- *)
-
- type
- TD3DTRIANGLE = record
- case Integer of
- 0: (
- v1: WORD; (* Vertex indices *)
- v2: WORD;
- v3: WORD;
- wFlags: WORD; (* Edge (and other) flags *)
- );
- 1: (
- wV1: WORD;
- wV2: WORD;
- wV3: WORD;
- );
- end;
-
- (*
- * Line strip structure.
- * The instruction count - 1 defines the number of line segments.
- *)
-
- TD3DLINE = record
- case Integer of
- 0: (
- v1: WORD; (* Vertex indices *)
- v2: WORD;
- );
- 1: (
- wV1: WORD;
- wV2: WORD;
- );
- end;
-
- (*
- * Span structure
- * Spans join a list of points with the same y value.
- * If the y value changes, a new span is started.
- *)
-
- TD3DSPAN = record
- wCount: WORD; (* Number of spans *)
- wFirst: WORD; (* Index to first vertex *)
- end;
-
- (*
- * Point structure
- *)
-
- TD3DPOINT = record
- wCount: WORD; (* number of points *)
- wFirst: WORD; (* index to first vertex *)
- end;
-
- (*
- * Forward branch structure.
- * Mask is logically anded with the driver status mask
- * if the result equals 'value', the branch is taken.
- *)
-
- TD3DBRANCH = record
- dwMask: DWORD; (* Bitmask against D3D status *)
- dwValue: DWORD;
- bNegate: BOOL; (* TRUE to negate comparison *)
- dwOffset: DWORD; (* How far to branch forward (0 for exit)*)
- end;
-
- (*
- * Status used for set status instruction.
- * The D3D status is initialised on device creation
- * and is modified by all execute calls.
- *)
-
- TD3DSTATUS = record
- dwFlags: DWORD; (* Do we set extents or status *)
- dwStatus: DWORD; (* D3D status *)
- drExtent: TD3DRECT;
- end;
-
- const
- D3DSETSTATUS_STATUS = $00000001;
- D3DSETSTATUS_EXTENTS = $00000002;
- D3DSETSTATUS_ALL = ( D3DSETSTATUS_STATUS or D3DSETSTATUS_EXTENTS );
-
- (*
- * Statistics structure
- *)
-
- type
- TD3DSTATS = record
- dwSize: DWORD;
- dwTrianglesDrawn: DWORD;
- dwLinesDrawn: DWORD;
- dwPointsDrawn: DWORD;
- dwSpansDrawn: DWORD;
- dwVerticesProcessed: DWORD;
- end;
-
- (*
- * Execute options.
- * When calling using D3DEXECUTE_UNCLIPPED all the primitives
- * inside the buffer must be contained within the viewport.
- *)
-
- const
- D3DEXECUTE_CLIPPED = $00000001;
- D3DEXECUTE_UNCLIPPED = $00000002;
-
- type
- TD3DEXECUTEDATA = record
- dwSize: DWORD;
- dwVertexOffset: DWORD;
- dwVertexCount: DWORD;
- dwInstructionOffset: DWORD;
- dwInstructionLength: DWORD;
- dwHVertexOffset: DWORD;
- dsStatus: TD3DSTATUS; (* Status after execute *)
- end;
-
- (*
- * Palette flags.
- * This are or'ed with the peFlags in the PALETTEENTRYs passed to DirectDraw.
- *)
-
- const
- D3DPAL_FREE = $00; (* Renderer may use this entry freely *)
- D3DPAL_READONLY = $40; (* Renderer may not set this entry *)
- D3DPAL_RESERVED = $80; (* Renderer may not use this entry *)
-
-
- { from d3dcaps.h }
-
- (* Description of capabilities of transform *)
-
- type
- TD3DTRANSFORMCAPS = record
- dwSize: DWORD;
- dwCaps: DWORD;
- end;
-
- const
- D3DTRANSFORMCAPS_CLIP = $00000001; (* Will clip whilst transforming *)
-
- (* Description of capabilities of lighting *)
-
- type
- TD3DLIGHTINGCAPS = record
- dwSize: DWORD;
- dwCaps: DWORD; (* Lighting caps *)
- dwLightingModel: DWORD; (* Lighting model - RGB or mono *)
- dwNumLights: DWORD; (* Number of lights that can be handled *)
- end;
-
- const
- D3DLIGHTINGMODEL_RGB = $00000001;
- D3DLIGHTINGMODEL_MONO = $00000002;
-
- D3DLIGHTCAPS_POINT = $00000001; (* Point lights supported *)
- D3DLIGHTCAPS_SPOT = $00000002; (* Spot lights supported *)
- D3DLIGHTCAPS_DIRECTIONAL = $00000004; (* Directional lights supported *)
- D3DLIGHTCAPS_PARALLELPOINT = $00000008; (* Parallel point lights supported *)
- D3DLIGHTCAPS_GLSPOT = $00000010; (* GL syle spot lights supported *)
-
- (* D3DPRIMCAPS dwMiscCaps *)
-
- D3DPMISCCAPS_MASKPLANES = $00000001;
- D3DPMISCCAPS_MASKZ = $00000002;
- D3DPMISCCAPS_LINEPATTERNREP = $00000004;
- D3DPMISCCAPS_CONFORMANT = $00000008;
- D3DPMISCCAPS_CULLNONE = $00000010;
- D3DPMISCCAPS_CULLCW = $00000020;
- D3DPMISCCAPS_CULLCCW = $00000040;
-
- (* D3DPRIMCAPS dwRasterCaps *)
-
- D3DPRASTERCAPS_DITHER = $00000001;
- D3DPRASTERCAPS_ROP2 = $00000002;
- D3DPRASTERCAPS_XOR = $00000004;
- D3DPRASTERCAPS_PAT = $00000008;
- D3DPRASTERCAPS_ZTEST = $00000010;
- D3DPRASTERCAPS_SUBPIXEL = $00000020;
- D3DPRASTERCAPS_SUBPIXELX = $00000040;
- D3DPRASTERCAPS_FOGVERTEX = $00000080;
- D3DPRASTERCAPS_FOGTABLE = $00000100;
- D3DPRASTERCAPS_STIPPLE = $00000200;
-
- (* Description of capabilities for each primitive type *)
-
- type
- TD3DPrimCaps = record
- dwSize: DWORD;
- dwMiscCaps: DWORD; (* Capability flags *)
- dwRasterCaps: DWORD;
- dwZCmpCaps: DWORD;
- dwSrcBlendCaps: DWORD;
- dwDestBlendCaps: DWORD;
- dwAlphaCmpCaps: DWORD;
- dwShadeCaps: DWORD;
- dwTextureCaps: DWORD;
- dwTextureFilterCaps: DWORD;
- dwTextureBlendCaps: DWORD;
- dwTextureAddressCaps: DWORD;
- dwStippleWidth: DWORD; (* maximum width and height of *)
- dwStippleHeight: DWORD; (* of supported stipple (up to 32x32) *)
- end;
-
- (* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps *)
-
- const
- D3DPCMPCAPS_NEVER = $00000001;
- D3DPCMPCAPS_LESS = $00000002;
- D3DPCMPCAPS_EQUAL = $00000004;
- D3DPCMPCAPS_LESSEQUAL = $00000008;
- D3DPCMPCAPS_GREATER = $00000010;
- D3DPCMPCAPS_NOTEQUAL = $00000020;
- D3DPCMPCAPS_GREATEREQUAL = $00000040;
- D3DPCMPCAPS_ALWAYS = $00000080;
-
- (* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps *)
-
- D3DPBLENDCAPS_ZERO = $00000001;
- D3DPBLENDCAPS_ONE = $00000002;
- D3DPBLENDCAPS_SRCCOLOR = $00000004;
- D3DPBLENDCAPS_INVSRCCOLOR = $00000008;
- D3DPBLENDCAPS_SRCALPHA = $00000010;
- D3DPBLENDCAPS_INVSRCALPHA = $00000020;
- D3DPBLENDCAPS_DESTALPHA = $00000040;
- D3DPBLENDCAPS_INVDESTALPHA = $00000080;
- D3DPBLENDCAPS_DESTCOLOR = $00000100;
- D3DPBLENDCAPS_INVDESTCOLOR = $00000200;
- D3DPBLENDCAPS_SRCALPHASAT = $00000400;
- D3DPBLENDCAPS_BOTHSRCALPHA = $00000800;
- D3DPBLENDCAPS_BOTHINVSRCALPHA = $00001000;
-
- (* D3DPRIMCAPS dwShadeCaps *)
-
- D3DPSHADECAPS_COLORFLATMONO = $00000001;
- D3DPSHADECAPS_COLORFLATRGB = $00000002;
- D3DPSHADECAPS_COLORGOURAUDMONO = $00000004;
- D3DPSHADECAPS_COLORGOURAUDRGB = $00000008;
- D3DPSHADECAPS_COLORPHONGMONO = $00000010;
- D3DPSHADECAPS_COLORPHONGRGB = $00000020;
-
- D3DPSHADECAPS_SPECULARFLATMONO = $00000040;
- D3DPSHADECAPS_SPECULARFLATRGB = $00000080;
- D3DPSHADECAPS_SPECULARGOURAUDMONO = $00000100;
- D3DPSHADECAPS_SPECULARGOURAUDRGB = $00000200;
- D3DPSHADECAPS_SPECULARPHONGMONO = $00000400;
- D3DPSHADECAPS_SPECULARPHONGRGB = $00000800;
-
- D3DPSHADECAPS_ALPHAFLATBLEND = $00001000;
- D3DPSHADECAPS_ALPHAFLATSTIPPLED = $00002000;
- D3DPSHADECAPS_ALPHAGOURAUDBLEND = $00004000;
- D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED = $00008000;
- D3DPSHADECAPS_ALPHAPHONGBLEND = $00010000;
- D3DPSHADECAPS_ALPHAPHONGSTIPPLED = $00020000;
-
- D3DPSHADECAPS_FOGFLAT = $00040000;
- D3DPSHADECAPS_FOGGOURAUD = $00080000;
- D3DPSHADECAPS_FOGPHONG = $00100000;
-
- (* D3DPRIMCAPS dwTextureCaps *)
-
- D3DPTEXTURECAPS_PERSPECTIVE = $00000001;
- D3DPTEXTURECAPS_POW2 = $00000002;
- D3DPTEXTURECAPS_ALPHA = $00000004;
- D3DPTEXTURECAPS_TRANSPARENCY = $00000008;
- D3DPTEXTURECAPS_BORDER = $00000010;
- D3DPTEXTURECAPS_SQUAREONLY = $00000020;
-
- (* D3DPRIMCAPS dwTextureFilterCaps *)
-
- D3DPTFILTERCAPS_NEAREST = $00000001;
- D3DPTFILTERCAPS_LINEAR = $00000002;
- D3DPTFILTERCAPS_MIPNEAREST = $00000004;
- D3DPTFILTERCAPS_MIPLINEAR = $00000008;
- D3DPTFILTERCAPS_LINEARMIPNEAREST = $00000010;
- D3DPTFILTERCAPS_LINEARMIPLINEAR = $00000020;
-
- (* D3DPRIMCAPS dwTextureBlendCaps *)
-
- D3DPTBLENDCAPS_DECAL = $00000001;
- D3DPTBLENDCAPS_MODULATE = $00000002;
- D3DPTBLENDCAPS_DECALALPHA = $00000004;
- D3DPTBLENDCAPS_MODULATEALPHA = $00000008;
- D3DPTBLENDCAPS_DECALMASK = $00000010;
- D3DPTBLENDCAPS_MODULATEMASK = $00000020;
- D3DPTBLENDCAPS_COPY = $00000040;
-
- (* D3DPRIMCAPS dwTextureAddressCaps *)
- D3DPTADDRESSCAPS_WRAP = $00000001;
- D3DPTADDRESSCAPS_MIRROR = $00000002;
- D3DPTADDRESSCAPS_CLAMP = $00000004;
-
- (*
- * Description for a device.
- * This is used to describe a device that is to be created or to query
- * the current device.
- *)
-
- type
- TD3DDeviceDesc = record
- dwSize: DWORD; (* Size of D3DDEVICEDESC structure *)
- dwFlags: DWORD; (* Indicates which fields have valid data *)
- dcmColorModel: TD3DCOLORMODEL; (* Color model of device *)
- dwDevCaps: DWORD; (* Capabilities of device *)
- dtcTransformCaps: TD3DTRANSFORMCAPS; (* Capabilities of transform *)
- bClipping: BOOL; (* Device can do 3D clipping *)
- dlcLightingCaps: TD3DLIGHTINGCAPS; (* Capabilities of lighting *)
- dpcLineCaps: TD3DPRIMCAPS;
- dpcTriCaps: TD3DPRIMCAPS;
- dwDeviceRenderBitDepth: DWORD; (* One of DDBB_8, 16, etc.. *)
- dwDeviceZBufferBitDepth: DWORD; (* One of DDBD_16, 32, etc.. *)
- dwMaxBufferSize: DWORD; (* Maximum execute buffer size *)
- dwMaxVertexCount: DWORD; (* Maximum vertex count *)
- end;
-
- TD3DENUMDEVICESCALLBACK = function ( const Guid: TGUID;
- lpDeviceDescription, lpDeviceName: PChar;
- const lpD3DHWDeviceDesc: TD3DDEVICEDESC;
- const lpD3DHELDeviceDesc: TD3DDEVICEDESC;
- lpUserArg: Pointer): HRESULT; stdcall;
-
- (* D3DDEVICEDESC dwFlags indicating valid fields *)
-
- const
- D3DDD_COLORMODEL = $00000001; (* dcmColorModel is valid *)
- D3DDD_DEVCAPS = $00000002; (* dwDevCaps is valid *)
- D3DDD_TRANSFORMCAPS = $00000004; (* dtcTransformCaps is valid *)
- D3DDD_LIGHTINGCAPS = $00000008; (* dlcLightingCaps is valid *)
- D3DDD_BCLIPPING = $00000010; (* bClipping is valid *)
- D3DDD_LINECAPS = $00000020; (* dpcLineCaps is valid *)
- D3DDD_TRICAPS = $00000040; (* dpcTriCaps is valid *)
- D3DDD_DEVICERENDERBITDEPTH = $00000080; (* dwDeviceRenderBitDepth is valid *)
- D3DDD_DEVICEZBUFFERBITDEPTH = $00000100; (* dwDeviceZBufferBitDepth is valid *)
- D3DDD_MAXBUFFERSIZE = $00000200; (* dwMaxBufferSize is valid *)
- D3DDD_MAXVERTEXCOUNT = $00000400; (* dwMaxVertexCount is valid *)
-
- (* D3DDEVICEDESC dwDevCaps flags *)
-
- D3DDEVCAPS_FLOATTLVERTEX = $00000001; (* Device accepts floating point *)
- (* for post-transform vertex data *)
- D3DDEVCAPS_SORTINCREASINGZ = $00000002; (* Device needs data sorted for increasing Z*)
- D3DDEVCAPS_SORTDECREASINGZ = $00000004; (* Device needs data sorted for decreasing Z*)
- D3DDEVCAPS_SORTEXACT = $00000008; (* Device needs data sorted exactly *)
-
- D3DDEVCAPS_EXECUTESYSTEMMEMORY = $00000010; (* Device can use execute buffers from system memory *)
- D3DDEVCAPS_EXECUTEVIDEOMEMORY = $00000020; (* Device can use execute buffers from video memory *)
- D3DDEVCAPS_TLVERTEXSYSTEMMEMORY = $00000040; (* Device can use TL buffers from system memory *)
- D3DDEVCAPS_TLVERTEXVIDEOMEMORY = $00000080; (* Device can use TL buffers from video memory *)
- D3DDEVCAPS_TEXTURESYSTEMMEMORY = $00000100; (* Device can texture from system memory *)
- D3DDEVCAPS_TEXTUREVIDEOMEMORY = $00000200; (* Device can texture from device memory *)
-
- D3DFDS_COLORMODEL = $00000001; (* Match color model *)
- D3DFDS_GUID = $00000002; (* Match guid *)
- D3DFDS_HARDWARE = $00000004; (* Match hardware/software *)
- D3DFDS_TRIANGLES = $00000008; (* Match in triCaps *)
- D3DFDS_LINES = $00000010; (* Match in lineCaps *)
- D3DFDS_MISCCAPS = $00000020; (* Match primCaps.dwMiscCaps *)
- D3DFDS_RASTERCAPS = $00000040; (* Match primCaps.dwRasterCaps *)
- D3DFDS_ZCMPCAPS = $00000080; (* Match primCaps.dwZCmpCaps *)
- D3DFDS_ALPHACMPCAPS = $00000100; (* Match primCaps.dwAlphaCmpCaps *)
- D3DFDS_SRCBLENDCAPS = $00000200; (* Match primCaps.dwSourceBlendCaps *)
- D3DFDS_DSTBLENDCAPS = $00000400; (* Match primCaps.dwDestBlendCaps *)
- D3DFDS_SHADECAPS = $00000800; (* Match primCaps.dwShadeCaps *)
- D3DFDS_TEXTURECAPS = $00001000; (* Match primCaps.dwTextureCaps *)
- D3DFDS_TEXTUREFILTERCAPS = $00002000; (* Match primCaps.dwTextureFilterCaps *)
- D3DFDS_TEXTUREBLENDCAPS = $00004000; (* Match primCaps.dwTextureBlendCaps *)
- D3DFDS_TEXTUREADDRESSCAPS = $00008000; (* Match primCaps.dwTextureBlendCaps *)
-
- (*
- * FindDevice arguments
- *)
-
- type
- TD3DFINDDEVICESEARCH = record
- dwSize: DWORD;
- dwFlags: DWORD;
- bHardware: BOOL;
- dcmColorModel: TD3DCOLORMODEL;
- guid: TGUID;
- dwCaps: DWORD;
- dpcPrimCaps: TD3DPRIMCAPS;
- end;
-
- TD3DFINDDEVICERESULT = record
- dwSize: DWORD;
- guid: TGUID; (* guid which matched *)
- ddHwDesc: TD3DDEVICEDESC; (* hardware D3DDEVICEDESC *)
- ddSwDesc: TD3DDEVICEDESC; (* software D3DDEVICEDESC *)
- end;
-
- (*
- * Description of execute buffer.
- *)
-
- TD3DExecuteBufferDesc = record
- dwSize: DWORD; (* size of this structure *)
- dwFlags: DWORD; (* flags indicating which fields are valid *)
- dwCaps: DWORD; (* capabilities of execute buffer *)
- dwBufferSize: DWORD; (* size of execute buffer data *)
- lpData: Pointer; (* pointer to actual data *)
- end;
-
- (* D3DEXECUTEBUFFER dwFlags indicating valid fields *)
-
- const
- D3DDEB_BUFSIZE = $00000001; (* buffer size valid *)
- D3DDEB_CAPS = $00000002; (* caps valid *)
- D3DDEB_LPDATA = $00000004; (* lpData valid *)
-
- (* D3DEXECUTEBUFFER dwCaps *)
-
- D3DDEBCAPS_SYSTEMMEMORY = $00000001; (* buffer in system memory *)
- D3DDEBCAPS_VIDEOMEMORY = $00000002; (* buffer in device memory *)
- D3DDEBCAPS_MEM = ( D3DDEBCAPS_SYSTEMMEMORY or D3DDEBCAPS_VIDEOMEMORY );
-
- (*
- * Flags for execute buffer calls
- *)
- const
- D3DNEXT_NEXT = $00000001;
- D3DNEXT_HEAD = $00000002;
- D3DNEXT_TAIL = $00000004;
-
- { from d3d.h }
-
- type
- IDirect3D = interface;
- IDirect3DDevice = interface;
- IDirect3DExecuteBuffer = interface;
- IDirect3DLight = interface;
- IDirect3DMaterial = interface;
- IDirect3DTexture = interface;
- IDirect3DViewport = interface;
-
- (*
- * IDirect3D
- *)
-
- IDirect3D = interface(IUnknown)
- ['{3BBA0080-2421-11CF-A31A-00AA00B93356}']
- function Initialize(const IID: TGUID): HRESULT; stdcall;
- function EnumDevices(lpEnumDevicesCallback: TD3DENUMDEVICESCALLBACK;
- lpUserArg: Pointer): HRESULT; stdcall;
- function CreateLight(out lplpDirect3Dlight: IDirect3DLight;
- const pUnkOuter: IUnknown): HRESULT; stdcall;
- function CreateMaterial(out lplpDirect3DMaterial: IDirect3DMaterial;
- const pUnkOuter: IUnknown): HRESULT; stdcall;
- function CreateViewport(out lplpD3DViewport: IDirect3DViewport;
- const pUnkOuter: IUnknown): HRESULT; stdcall;
- function FindDevice(const lpD3DFDS:TD3DFINDDEVICESEARCH;
- var lpD3DFDR:TD3DFINDDEVICERESULT): HRESULT; stdcall;
- end;
-
- (*
- * IDirect3DDevice
- *)
-
- IDirect3DDevice = interface(IUnknown)
- function Initialize(const lpd3d: IDirect3D; const lpGUID: TGUID;
- const lpd3ddvdesc:TD3DDEVICEDESC): HRESULT; stdcall;
- function GetCaps(var lpD3DHWDevDesc:TD3DDEVICEDESC;
- var lpD3DHELDevDesc:TD3DDEVICEDESC): HRESULT; stdcall;
- function SwapTextureHandles(const Tex1, Tex2: IDirect3DTexture): HRESULT;
- stdcall;
- function CreateExecuteBuffer(const lpDesc:TD3DEXECUTEBUFFERDESC;
- out lplpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
- const pUnkOuter: IUnknown): HRESULT; stdcall;
- function GetStats(var lpD3DStats:TD3DSTATS): HRESULT; stdcall;
- function Execute(const lpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
- const lpDirect3DViewport: IDirect3DViewport;
- dwFlags: DWORD): HRESULT; stdcall;
- function AddViewport(const lpDirect3DViewport: IDirect3DViewport): HRESULT;
- stdcall;
- function DeleteViewport(
- const lpDirect3DViewport: IDirect3DViewport): HRESULT; stdcall;
- function NextViewport(const lpDirect3DViewport: IDirect3DViewport;
- out lplpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD): HRESULT;
- stdcall;
- function Pick(const lpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
- const lpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD;
- const lpRect:TD3DRECT): HRESULT; stdcall;
- function GetPickRecords(var lpCount: DWORD;
- lpD3DPickRec: PD3DPICKRECORD): HRESULT; stdcall;
- function EnumTextureFormats(
- lpd3dEnumTextureProc: TD3DENUMTEXTUREFORMATSCALLBACK;
- lpArg: Pointer): HRESULT; stdcall;
- function CreateMatrix(var lpD3DMatHandle:TD3DMATRIXHANDLE): HRESULT;
- stdcall;
- function SetMatrix(d3dMatHandle:TD3DMATRIXHANDLE;
- const lpD3DMatrix:TD3DMATRIX): HRESULT; stdcall;
- function GetMatrix(const lpD3DMatHandle:TD3DMATRIXHANDLE;
- var lpD3DMatrix:TD3DMATRIX): HRESULT; stdcall;
- function DeleteMatrix(d3dMatHandle:TD3DMATRIXHANDLE): HRESULT; stdcall;
- function BeginScene: HRESULT; stdcall;
- function EndScene: HRESULT; stdcall;
- function GetDirect3D(out lpD3D: IDirect3D): HRESULT; stdcall;
- end;
-
- (*
- * IDirect3DExecuteBuffer
- *)
-
- IDirect3DExecuteBuffer = interface(IUnknown)
- ['{4417C145-33AD-11CF-816F-0000C020156E}']
- function Initialize(const lpDirect3DDevice: IDirect3DDevice;
- const lpDesc:TD3DEXECUTEBUFFERDESC): HRESULT; stdcall;
- function Lock(const lpDesc:TD3DEXECUTEBUFFERDESC): HRESULT; stdcall;
- function Unlock: HRESULT; stdcall;
- function SetExecuteData(const lpData:TD3DEXECUTEDATA): HRESULT; stdcall;
- function GetExecuteData(var lpData:TD3DEXECUTEDATA): HRESULT; stdcall;
- function Validate(var lpdwOffset: DWORD; lpFunc: TD3DVALIDATECALLBACK;
- lpUserArg: Pointer; dwReserved: DWORD): HRESULT; stdcall;
- function Optimize(dwFlags: DWORD): HRESULT; stdcall;
- end;
-
- (*
- * IDirect3DLight
- *)
-
- IDirect3DLight = interface(IUnknown)
- ['{4417C142-33AD-11CF-816F-0000C020156E}']
- function Initialize(const lpDirect3D: IDirect3D): HRESULT; stdcall;
- function SetLight(const lpLight:TD3DLIGHT): HRESULT; stdcall;
- function GetLight(var lpLight:TD3DLIGHT): HRESULT; stdcall;
- end;
-
- (*
- * IDirect3DMaterial
- *)
-
- IDirect3DMaterial = interface(IUnknown)
- ['{4417C144-33AD-11CF-816F-0000C020156E}']
- function Initialize(const lpDirect3D: IDirect3D): HRESULT; stdcall;
- function SetMaterial(const lpMat:TD3DMATERIAL): HRESULT; stdcall;
- function GetMaterial(var lpMat:TD3DMATERIAL): HRESULT; stdcall;
- function GetHandle(const lpDirect3DDevice: IDirect3DDevice;
- var lpHandle:TD3DMATERIALHANDLE): HRESULT; stdcall;
- function Reserve: HRESULT; stdcall;
- function Unreserve: HRESULT; stdcall;
- end;
-
- (*
- * IDirect3DTexture
- *)
-
- IDirect3DTexture = interface(IUnknown)
- ['{2CDCD9E0-25A0-11CF-A31A-00AA00B93356}']
- function Initialize(const lpD3DDevice: IDirect3DDevice;
- const lpDDSurface: IDirectDrawSurface): HRESULT; stdcall;
- function GetHandle(const lpDirect3DDevice: IDirect3DDevice;
- var lpHandle:TD3DTEXTUREHANDLE): HRESULT; stdcall;
- function PaletteChanged(dwStart: DWORD; dwCount: DWORD): HRESULT; stdcall;
- function Load(const lpD3DTexture: IDirect3DTexture): HRESULT; stdcall;
- function Unload: HRESULT; stdcall;
- end;
-
- (*
- * IDirect3DViewport
- *)
-
- IDirect3DViewport = interface(IUnknown)
- ['{4417C146-33AD-11CF-816F-0000C020156E}']
- function Initialize(const lpDirect3D: IDirect3D): HRESULT; stdcall;
- function GetViewport(var lpData:TD3DVIEWPORT): HRESULT; stdcall;
- function SetViewport(const lpData:TD3DVIEWPORT): HRESULT; stdcall;
- function TransformVertices(dwVertexCount: DWORD;
- var lpData:TD3DTRANSFORMDATA; dwFlags: DWORD;
- var lpOffscreen: DWORD): HRESULT; stdcall;
- function LightElements(dwElementCount: DWORD;
- var lpData:TD3DLIGHTDATA): HRESULT; stdcall;
- function SetBackground(hMat:TD3DMATERIALHANDLE): HRESULT; stdcall;
- function GetBackground(hMat:TD3DMATERIALHANDLE): HRESULT; stdcall;
- function SetBackgroundDepth(const lpDDSurface: IDirectDrawSurface): HRESULT;
- stdcall;
- function GetBackgroundDepth(out lplpDDSurface: IDirectDrawSurface;
- var lpValid: BOOL): HRESULT; stdcall;
- function Clear(dwCount: DWORD; lpRects: PD3DRECT;
- dwFlags: DWORD): HRESULT; stdcall;
- function AddLight(const lpDirect3DLight: IDirect3DLight): HRESULT; stdcall;
- function DeleteLight(const lpDirect3DLight: IDirect3DLight): HRESULT; stdcall;
- function NextLight(const lpDirect3DLight: IDirect3DLight;
- out lplpDirect3DLight: IDirect3DLight; dwFlags: DWORD): HRESULT;
- stdcall;
- end;
-
- (*
- * Direct3D Errors
- * DirectDraw error codes are used when errors not specified here.
- *)
-
- const
- D3D_OK = DD_OK;
- D3DERR_BADMAJORVERSION = $88760000 + 700;
- D3DERR_BADMINORVERSION = $88760000 + 701;
-
- D3DERR_EXECUTE_CREATE_FAILED = $88760000 + 710;
- D3DERR_EXECUTE_DESTROY_FAILED = $88760000 + 711;
- D3DERR_EXECUTE_LOCK_FAILED = $88760000 + 712;
- D3DERR_EXECUTE_UNLOCK_FAILED = $88760000 + 713;
- D3DERR_EXECUTE_LOCKED = $88760000 + 714;
- D3DERR_EXECUTE_NOT_LOCKED = $88760000 + 715;
-
- D3DERR_EXECUTE_FAILED = $88760000 + 716;
- D3DERR_EXECUTE_CLIPPED_FAILED = $88760000 + 717;
-
- D3DERR_TEXTURE_NO_SUPPORT = $88760000 + 720;
- D3DERR_TEXTURE_CREATE_FAILED = $88760000 + 721;
- D3DERR_TEXTURE_DESTROY_FAILED = $88760000 + 722;
- D3DERR_TEXTURE_LOCK_FAILED = $88760000 + 723;
- D3DERR_TEXTURE_UNLOCK_FAILED = $88760000 + 724;
- D3DERR_TEXTURE_LOAD_FAILED = $88760000 + 725;
- D3DERR_TEXTURE_SWAP_FAILED = $88760000 + 726;
- D3DERR_TEXTURE_LOCKED = $88760000 + 727;
- D3DERR_TEXTURE_NOT_LOCKED = $88760000 + 728;
- D3DERR_TEXTURE_GETSURF_FAILED = $88760000 + 729;
-
- D3DERR_MATRIX_CREATE_FAILED = $88760000 + 730;
- D3DERR_MATRIX_DESTROY_FAILED = $88760000 + 731;
- D3DERR_MATRIX_SETDATA_FAILED = $88760000 + 732;
- D3DERR_MATRIX_GETDATA_FAILED = $88760000 + 733;
- D3DERR_SETVIEWPORTDATA_FAILED = $88760000 + 734;
-
- D3DERR_MATERIAL_CREATE_FAILED = $88760000 + 740;
- D3DERR_MATERIAL_DESTROY_FAILED = $88760000 + 741;
- D3DERR_MATERIAL_SETDATA_FAILED = $88760000 + 742;
- D3DERR_MATERIAL_GETDATA_FAILED = $88760000 + 743;
-
- D3DERR_LIGHT_SET_FAILED = $88760000 + 750;
-
- D3DERR_SCENE_IN_SCENE = $88760000 + 760;
- D3DERR_SCENE_NOT_IN_SCENE = $88760000 + 761;
- D3DERR_SCENE_BEGIN_FAILED = $88760000 + 762;
- D3DERR_SCENE_END_FAILED = $88760000 + 763;
-
- { from d3drmdef.h }
-
- type
- TD3DRMVECTOR4D = record
- x, y, z, w:TD3DVALUE;
- end;
- PD3DRMVECTOR4D = ^TD3DRMVECTOR4D;
-
- TD3DRMMATRIX4D = Array [0..4, 0..4] of TD3DVALUE;
-
- TD3DRMQUATERNION = record
- s:TD3DVALUE;
- v:TD3DVECTOR;
- end;
- PD3DRMQUATERNION = ^TD3DRMQUATERNION;
-
- TD3DRMBOX = record
- min, max: TD3DVECTOR;
- end;
- PD3DRMBOX = ^TD3DRMBOX;
-
- TD3DRMWRAPCALLBACK = procedure ( var lpD3DVector:TD3DVECTOR;
- var lpU, lpV: Integer; var lpD3DRMVA, lpD3DRMVB:TD3DVECTOR;
- lpArg: Pointer ); stdcall;
-
- TD3DRMLIGHTTYPE = ( D3DRMLIGHT_AMBIENT, D3DRMLIGHT_POINT, D3DRMLIGHT_SPOT,
- D3DRMLIGHT_DIRECTIONAL, D3DRMLIGHT_PARALLELPOINT );
- PD3DRMLIGHTTYPE = ^TD3DRMLIGHTTYPE;
-
- TD3DRMSHADEMODE = WORD;
- PD3DRMSHADEMODE = ^TD3DRMSHADEMODE;
-
- const
- D3DRMSHADE_FLAT = 0;
- D3DRMSHADE_GOURAUD = 1;
- D3DRMSHADE_PHONG = 2;
- D3DRMSHADE_MASK = 7;
- D3DRMSHADE_MAX = 8;
-
- type
- TD3DRMLIGHTMODE = WORD;
- PD3DRMLIGHTMOD = ^TD3DRMLIGHTMODE;
-
- const
- D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX;
- D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX;
- D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX;
- D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX;
-
- type
- TD3DRMFILLMODE = WORD;
- PD3DRMFILLMODE = ^TD3DRMFILLMODE;
-
- const
- D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX;
- D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX;
- D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX;
- D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX;
- D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX;
-
- type
- TD3DRMRENDERQUALITY = DWORD;
- PD3DRMRENDERQUALITY = ^TD3DRMRENDERQUALITY;
-
- const
- D3DRMRENDER_WIREFRAME = ( D3DRMSHADE_FLAT + D3DRMLIGHT_OFF + D3DRMFILL_WIREFRAME );
- D3DRMRENDER_UNLITFLAT = ( D3DRMSHADE_FLAT + D3DRMLIGHT_OFF + D3DRMFILL_SOLID );
- D3DRMRENDER_FLAT = ( D3DRMSHADE_FLAT + D3DRMLIGHT_ON + D3DRMFILL_SOLID );
- D3DRMRENDER_GOURAUD = ( D3DRMSHADE_GOURAUD + D3DRMLIGHT_ON + D3DRMFILL_SOLID );
- D3DRMRENDER_PHONG = ( D3DRMSHADE_PHONG + D3DRMLIGHT_ON + D3DRMFILL_SOLID );
-
- type
- TD3DRMTEXTUREQUALITY = (
- D3DRMTEXTURE_NEAREST, (* choose nearest texel *)
- D3DRMTEXTURE_LINEAR, (* interpolate 4 texels *)
- D3DRMTEXTURE_MIPNEAREST, (* nearest texel in nearest mipmap *)
- D3DRMTEXTURE_MIPLINEAR, (* interpolate 2 texels from 2 mipmaps *)
- D3DRMTEXTURE_LINEARMIPNEAREST, (* interpolate 4 texels in nearest mipmap *)
- D3DRMTEXTURE_LINEARMIPLINEAR (* interpolate 8 texels from 2 mipmaps *)
- );
- PD3DRMTEXTUREQUALITY = ^TD3DRMTEXTUREQUALITY;
-
- TD3DRMCOMBINETYPE = ( D3DRMCOMBINE_REPLACE, D3DRMCOMBINE_BEFORE, D3DRMCOMBINE_AFTER );
- PD3DRMCOMBINETYPE = ^TD3DRMCOMBINETYPE;
-
- TD3DRMCOLORMODEL = TD3DCOLORMODEL;
- PD3DRMCOLORMODEL = ^TD3DRMCOLORMODEL;
-
- TD3DRMPALETTEFLAGS = (
- D3DRMPALETTE_FREE, (* renderer may use this entry freely *)
- D3DRMPALETTE_READONLY, (* fixed but may be used by renderer *)
- D3DRMPALETTE_RESERVED (* may not be used by renderer *)
- );
- PD3DRMPALETTEFLAGS = ^TD3DRMPALETTEFLAGS;
-
- TD3DRMPALETTEENTRY = record
- red: Byte; (* 0 .. 255 *)
- green: Byte; (* 0 .. 255 *)
- blue: Byte; (* 0 .. 255 *)
- flags: Byte; (* one of D3DRMPALETTEFLAGS *)
- end;
- PD3DRMPALETTEENTRY = ^TD3DRMPALETTEENTRY;
-
- TD3DRMIMAGE = record
- width, height: Integer; (* width and height in pixels *)
- aspectx, aspecty: Integer; (* aspect ratio for non-square pixels *)
- depth: Integer; (* bits per pixel *)
- rgb: Integer; (* if false, pixels are indices into a
- palette otherwise, pixels encode
- RGB values. *)
- bytes_per_line: Integer; (* number of bytes of memory for a
- scanline. This must be a multiple
- of 4. *)
- buffer1: Pointer; (* memory to render into (first buffer). *)
- buffer2: Pointer; (* second rendering buffer for double
- buffering, set to NULL for single
- buffering. *)
- red_mask: Longint;
- green_mask: Longint;
- blue_mask: Longint;
- alpha_mask: Longint; (* if rgb is true, these are masks for
- the red, green and blue parts of a
- pixel. Otherwise, these are masks
- for the significant bits of the
- red, green and blue elements in the
- palette. For instance, most SVGA
- displays use 64 intensities of red,
- green and blue, so the masks should
- all be set to 0xfc. *)
- palette_size: Integer; (* number of entries in palette *)
- palette: PD3DRMPALETTEENTRY; (* description of the palette (only if
- rgb is false). Must be (1<<depth)
- elements. *)
- end;
- PD3DRMIMAGE = ^TD3DRMIMAGE;
-
- TD3DRMWRAPTYPE = ( D3DRMWRAP_FLAT, D3DRMWRAP_CYLINDER, D3DRMWRAP_SPHERE, D3DRMWRAP_CHROME );
- PD3DRMWRAPTYPE = ^TD3DRMWRAPTYPE;
-
- const
- D3DRMWIREFRAME_CULL = 1; (* cull backfaces *)
- D3DRMWIREFRAME_HIDDENLINE = 2; (* lines are obscured by closer objects *)
-
- type
- TD3DRMPROJECTIONTYPE = ( D3DRMPROJECT_PERSPECTIVE, D3DRMPROJECT_ORTHOGRAPHIC );
- PD3DRMPROJECTIONTYPE = ^TD3DRMPROJECTIONTYPE;
-
- TD3DRMXOFFORMAT = ( D3DRMXOF_BINARY, D3DRMXOF_COMPRESSED, D3DRMXOF_TEXT );
- PD3DRMXOFFORMAT = ^TD3DRMXOFFORMAT;
-
- TD3DRMSAVEOPTIONS = DWORD;
- PD3DRMSAVEOPTIONS = ^TD3DRMSAVEOPTIONS;
-
- const
- D3DRMXOFSAVE_NORMALS = 1;
- D3DRMXOFSAVE_TEXTURECOORDINATES = 2;
- D3DRMXOFSAVE_MATERIALS = 4;
- D3DRMXOFSAVE_TEXTURENAMES = 8;
- D3DRMXOFSAVE_ALL = 15;
- D3DRMXOFSAVE_TEMPLATES = 16;
-
- type
- TD3DRMCOLORSOURCE = ( D3DRMCOLOR_FROMFACE, D3DRMCOLOR_FROMVERTEX );
- PD3DRMCOLORSOURCE = ^TD3DRMCOLORSOURCE;
-
- TD3DRMFRAMECONSTRAINT = (
- D3DRMCONSTRAIN_Z, (* use only X and Y rotations *)
- D3DRMCONSTRAIN_Y, (* use only X and Z rotations *)
- D3DRMCONSTRAIN_X (* use only Y and Z rotations *)
- );
- PD3DRMFRAMECONSTRAINT = ^TD3DRMFRAMECONSTRAINT;
-
- TD3DRMMATERIALMODE = ( D3DRMMATERIAL_FROMMESH, D3DRMMATERIAL_FROMPARENT,
- D3DRMMATERIAL_FROMFRAME );
- PD3DRMMATERIALMODE = ^TD3DRMMATERIALMODE;
-
- TD3DRMFOGMODE = (
- D3DRMFOG_LINEAR, (* linear between start and end *)
- D3DRMFOG_EXPONENTIAL, (* density * exp(-distance) *)
- D3DRMFOG_EXPONENTIALSQUARED (* density * exp(-distance*distance) *)
- );
- PD3DRMFOGMODE = ^TD3DRMFOGMODE;
-
- TD3DRMZBUFFERMODE = (
- D3DRMZBUFFER_FROMPARENT, (* default *)
- D3DRMZBUFFER_ENABLE, (* enable zbuffering *)
- D3DRMZBUFFER_DISABLE (* disable zbuffering *)
- );
- PD3DRMZBUFFERMODE = ^TD3DRMZBUFFERMODE;
-
- TD3DRMSORTMODE = (
- D3DRMSORT_FROMPARENT, (* default *)
- D3DRMSORT_NONE, (* don't sort child frames *)
- D3DRMSORT_FRONTTOBACK, (* sort child frames front-to-back *)
- D3DRMSORT_BACKTOFRONT (* sort child frames back-to-front *)
- );
- PD3DRMSORTMODE = ^TD3DRMSORTMODE;
-
- TD3DRMANIMATIONOPTIONS = DWORD;
-
- const
- D3DRMANIMATION_OPEN = $01;
- D3DRMANIMATION_CLOSED = $02;
- D3DRMANIMATION_LINEARPOSITION = $04;
- D3DRMANIMATION_SPLINEPOSITION = $08;
- D3DRMANIMATION_SCALEANDROTATION = $00000010;
- D3DRMANIMATION_POSITION = $00000020;
-
- type
- TD3DRMLOADOPTIONS = DWORD;
-
- const
- D3DRMLOAD_FROMFILE = $00;
- D3DRMLOAD_FROMRESOURCE = $01;
- D3DRMLOAD_FROMMEMORY = $02;
- D3DRMLOAD_FROMSTREAM = $04;
-
- D3DRMLOAD_BYNAME = $10;
- D3DRMLOAD_BYPOSITION = $20;
- D3DRMLOAD_BYGUID = $40;
- D3DRMLOAD_FIRST = $80;
-
- D3DRMLOAD_INSTANCEBYREFERENCE = $100;
- D3DRMLOAD_INSTANCEBYCOPYING = $200;
-
- type
- TD3DRMLOADRESOURCE = record
- hModule: HMODULE;
- lpName: PChar;
- lpType: PChar;
- end;
- PD3DRMLOADRESOURCE = ^TD3DRMLOADRESOURCE;
-
- TD3DRMLOADMEMORY = record
- lpMemory: Pointer;
- dSize: DWORD;
- end;
- PD3DRMLOADMEMORY = ^TD3DRMLOADMEMORY;
-
- TD3DRMUSERVISUALREASON = ( D3DRMUSERVISUAL_CANSEE, D3DRMUSERVISUAL_RENDER );
- PD3DRMUSERVISUALREASON = ^TD3DRMUSERVISUALREASON;
-
- TD3DRMMAPPING = DWORD;
- TD3DRMMAPPINGFLAG = DWORD;
- PD3DRMMAPPING = ^TD3DRMMAPPING;
-
- const
- D3DRMMAP_WRAPU = 1;
- D3DRMMAP_WRAPV = 2;
- D3DRMMAP_PERSPCORRECT = 4;
-
- type
- TD3DRMVERTEX = record
- position:TD3DVECTOR;
- normal:TD3DVECTOR;
- tu, tv:TD3DVALUE;
- color:TD3DCOLOR;
- end;
- PD3DRMVERTEX = ^TD3DRMVERTEX;
-
- TD3DRMGROUPINDEX = Longint; (* group indexes begin a 0 *)
-
- const
- D3DRMGROUP_ALLGROUPS = -1;
-
- function D3DRMCreateColorRGB (red, green, blue:TD3DVALUE):TD3DCOLOR; stdcall;
- function D3DRMCreateColorRGBA (red, green, blue, alpha:TD3DVALUE):TD3DCOLOR; stdcall;
- function D3DRMColorGetRed (d3drmc:TD3DCOLOR):TD3DVALUE;
- function D3DRMColorGetGreen (d3drmc:TD3DCOLOR):TD3DVALUE;
- function D3DRMColorGetBlue (d3drmc:TD3DCOLOR):TD3DVALUE;
- function D3DRMColorGetAlpha (d3drmc:TD3DCOLOR):TD3DVALUE;
- function D3DRMVectorAdd (var d, s1, s2:TD3DVECTOR): PD3DVECTOR; stdcall;
- function D3DRMVectorSubtract (var d, s1, s2:TD3DVECTOR): PD3DVECTOR; stdcall;
- function D3DRMVectorReflect (var d, ray, norm:TD3DVECTOR): PD3DVECTOR; stdcall;
- function D3DRMVectorCrossProduct (var d, s1, s2:TD3DVECTOR): PD3DVECTOR; stdcall;
- function D3DRMVectorDotProduct (var s1, s2:TD3DVECTOR):TD3DVALUE; stdcall;
- function D3DRMVectorNormalize (var lpv:TD3DVECTOR): PD3DVECTOR; stdcall;
- function D3DRMVectorNormalise (var lpv:TD3DVECTOR): PD3DVECTOR; stdcall;
- function D3DRMVectorModulus (var v:TD3DVECTOR):TD3DVALUE; stdcall;
- function D3DRMVectorRotate (var r, v, axis:TD3DVECTOR;
- theta:TD3DVALUE): PD3DVECTOR; stdcall;
- function D3DRMVectorScale(var d, s:TD3DVECTOR;
- factor:TD3DVALUE): PD3DVECTOR; stdcall;
- function D3DRMVectorRandom (var d:TD3DVECTOR): PD3DVECTOR; stdcall;
- function D3DRMQuaternionFromRotation (var quat: TD3DRMQUATERNION;
- var v: TD3DVECTOR; theta:TD3DVALUE): PD3DRMQUATERNION; stdcall;
- function D3DRMQuaternionMultiply (var q, a, b:TD3DRMQUATERNION): PD3DRMQUATERNION; stdcall;
- function D3DRMQuaternionSlerp(var q, a, b:TD3DRMQUATERNION;
- alpha:TD3DVALUE): PD3DRMQUATERNION; stdcall;
- procedure D3DRMMatrixFromQuaternion (dmMat:TD3DRMMATRIX4D;
- var lpDqQuat: TD3DRMQUATERNION); stdcall;
-
-
- { from d3drmobj.h }
- type
- IDirect3DRMObject = interface;
- IDirect3DRMDevice = interface;
- IDirect3DRMViewport = interface;
- IDirect3DRMFrame = interface;
- IDirect3DRMVisual = interface;
- IDirect3DRMMesh = interface;
- IDirect3DRMMeshBuilder = interface;
- IDirect3DRMFace = interface;
- IDirect3DRMLight = interface;
- IDirect3DRMTexture = interface;
- IDirect3DRMWrap = interface;
- IDirect3DRMMaterial = interface;
- IDirect3DRMAnimation = interface;
- IDirect3DRMAnimationSet = interface;
- IDirect3DRMUserVisual = interface;
- IDirect3DRMShadow = interface;
- IDirect3DRMArray = interface;
- IDirect3DRMDeviceArray = interface;
- IDirect3DRMFaceArray = interface;
- IDirect3DRMViewportArray = interface;
- IDirect3DRMFrameArray = interface;
- IDirect3DRMVisualArray = interface;
- IDirect3DRMPickedArray = interface;
- IDirect3DRMLightArray = interface;
-
- TD3DRMOBJECTCALLBACK = procedure (const D3DRMobj: IDirect3DRMObject;
- lpArg: Pointer) stdcall;
- TD3DRMFRAMEMOVECALLBACK = procedure (const D3DRMFrame: IDirect3DRMFrame;
- lpArg: Pointer; delta: TD3DVALUE) stdcall;
- TD3DRMUPDATECALLBACK = procedure (const obj: IDirect3DRMDevice;
- lpArg: Pointer; iRectCount: Integer; d3dRectUpdate: PD3DRECT) stdcall;
- TD3DRMUSERVISUALCALLBACK = function (const D3DRMUV: IDirect3DRMUserVisual;
- lpArg: Pointer; D3DRMUVreason: TD3DRMUSERVISUALREASON;
- const D3DRMDev: IDirect3DRMDevice;
- const D3DRMview: IDirect3DRMViewport): Integer stdcall;
- TD3DRMLOADTEXTURECALLBACK = function (tex_name: PChar; lpArg: Pointer;
- const D3DRMTex: IDirect3DRMTexture): HRESULT stdcall;
- TD3DRMLOADCALLBACK = procedure (const Obj: IDirect3DRMObject;
- const ObjectGuid: TGUID; lpArg: Pointer) stdcall;
-
- PD3DRMPICKDESC = ^TD3DRMPICKDESC;
- TD3DRMPICKDESC = record
- ulFaceIdx: LongInt;
- lGroupIdx: LongInt;
- vPosition: TD3DVECTOR;
- end;
-
- IDirect3DRMObject = interface (IUnknown)
- ['{eb16cb00-d271-11ce-ac48-0000c03825a1}']
- function Clone (const pUnkOuter: IUnknown; const riid: TGUID;
- out ppvObj): HRESULT; stdcall;
- function AddDestroyCallback (lpCallback: TD3DRMOBJECTCALLBACK;
- lpArg: Pointer): HRESULT; stdcall;
- function DeleteDestroyCallback (d3drmObjProc: TD3DRMOBJECTCALLBACK;
- lpArg: Pointer): HRESULT; stdcall;
- function SetAppData (ulData: DWORD): HRESULT; stdcall;
- function GetAppData: DWORD; stdcall;
- function SetName (lpName: PChar): HRESULT; stdcall;
- function GetName (var lpdwSize: DWORD; lpName: PChar): HRESULT; stdcall;
- function GetClassName (var lpdwSize: DWORD; lpName: PChar): HRESULT;
- stdcall;
- end;
-
- IDirect3DRMVisual = interface (IDirect3DRMObject)
- ['{eb16cb04-d271-11ce-ac48-0000c03825a1}']
- end;
-
- IDirect3DRMDevice = interface (IDirect3DRMObject)
- ['{e9e19280-6e05-11cf-ac4a-0000c03825a1}']
- function Init (width: LongInt; height: LongInt): HRESULT; stdcall;
- function InitFromD3D (const D3D: IDirect3D;
- const D3DIMDev: IDirect3DDevice): HRESULT; stdcall;
- function InitFromClipper (const DDClipper: IDirectDrawClipper;
- const GUID: TGUID; width: Integer; height: Integer): HRESULT; stdcall;
- function Update: HRESULT; stdcall;
- function AddUpdateCallback (d3drmUpdateProc: TD3DRMUPDATECALLBACK;
- arg: Pointer): HRESULT; stdcall;
- function DeleteUpdateCallback (d3drmUpdateProc: TD3DRMUPDATECALLBACK;
- arg: Pointer): HRESULT; stdcall;
- function SetBufferCount (dwCount: DWORD): HRESULT; stdcall;
- function GetBufferCount: DWORD; stdcall;
- function SetDither (bDither: BOOL): HRESULT; stdcall;
- function SetShades (ulShades: DWORD): HRESULT; stdcall;
- function SetQuality (rqQuality: TD3DRMRENDERQUALITY): HRESULT; stdcall;
- function SetTextureQuality (
- tqTextureQuality: TD3DRMTEXTUREQUALITY): HRESULT; stdcall;
- function GetViewports (out Viewports: IDirect3DRMViewportArray): HRESULT;
- stdcall;
- function GetDither: BOOL; stdcall;
- function GetShades: DWORD; stdcall;
- function GetHeight: DWORD; stdcall;
- function GetWidth: DWORD; stdcall;
- function GetTrianglesDrawn: DWORD; stdcall;
- function GetWireframeOptions: DWORD; stdcall;
- function GetQuality: TD3DRMRENDERQUALITY; stdcall;
- function GetColorModel: TD3DCOLORMODEL; stdcall;
- function GetTextureQuality: TD3DRMTEXTUREQUALITY; stdcall;
- function GetDirect3DDevice (out D3DDevice: IDirect3DDevice): HRESULT;
- stdcall;
- end;
-
- IDirect3DRMViewport = interface (IDirect3DRMObject)
- ['{eb16cb02-d271-11ce-ac48-0000c03825a1}']
- function Init (const D3DRMDevice: IDirect3DRMDevice;
- const D3DRMFrameCamera: IDirect3DRMFrame;
- xpos, ypos, width, height: DWORD): HRESULT; stdcall;
- function Clear: HRESULT; stdcall;
- function Render (const D3DRMFrame: IDirect3DRMFrame): HRESULT; stdcall;
- function SetFront (rvFront: TD3DVALUE): HRESULT; stdcall;
- function SetBack (rvBack: TD3DVALUE): HRESULT; stdcall;
- function SetField (rvField: TD3DVALUE): HRESULT; stdcall;
- function SetUniformScaling (bScale: BOOL): HRESULT; stdcall;
- function SetCamera (const Camera: IDirect3DRMFrame): HRESULT; stdcall;
- function SetProjection (rptType: TD3DRMPROJECTIONTYPE): HRESULT; stdcall;
- function Transform (var lprvDst: TD3DRMVECTOR4D;
- var lprvSrc: TD3DVECTOR): HRESULT; stdcall;
- function InverseTransform (var lprvDst: TD3DVECTOR;
- var lprvSrc: TD3DRMVECTOR4D): HRESULT; stdcall;
- function Configure (lX, lY: LongInt; dwWidth, dwHeight: DWORD): HRESULT;
- stdcall;
- function ForceUpdate (dwX1, dwY1, dwX2, dwY2: DWORD): HRESULT; stdcall;
- function SetPlane (rvLeft, rvRight, rvBottom, rvTop: TD3DVALUE): HRESULT;
- stdcall;
- function GetCamera (const Camera: IDirect3DRMFrame): HRESULT; stdcall;
- function GetDevice (const D3DRMDevice: IDirect3DRMDevice): HRESULT; stdcall;
- function GetPlane (var lpd3dvLeft, lpd3dvRight, lpd3dvBottom,
- lpd3dvTop: TD3DVALUE): HRESULT; stdcall;
- function Pick (lX, lY: LongInt;
- var lplpVisuals: IDirect3DRMPickedArray): HRESULT; stdcall;
- function GetUniformScaling: BOOL; stdcall;
- function GetX: LongInt; stdcall;
- function GetY: LongInt; stdcall;
- function GetWidth: DWORD; stdcall;
- function GetHeight: DWORD; stdcall;
- function GetField: TD3DVALUE; stdcall;
- function GetBack: TD3DVALUE; stdcall;
- function GetFront: TD3DVALUE; stdcall;
- function GetProjection: TD3DRMPROJECTIONTYPE; stdcall;
- function GetDirect3DViewport (var lplpD3DViewport: IDirect3DViewport):HRESULT;
- stdcall;
- end;
-
- IDirect3DRMFrame = interface (IDirect3DRMVisual)
- ['{eb16cb03-d271-11ce-ac48-0000c03825a1}']
- function AddChild (const D3DRMFrameChild: IDirect3DRMFrame): HRESULT; stdcall;
- function AddLight (const D3DRMLight: IDirect3DRMLight): HRESULT; stdcall;
- function AddMoveCallback (d3drmFMC: TD3DRMFRAMEMOVECALLBACK;
- lpArg: Pointer): HRESULT; stdcall;
- function AddTransform (rctCombine: TD3DRMCOMBINETYPE;
- rmMatrix: TD3DRMMATRIX4D): HRESULT; stdcall;
- function AddTranslation (rctCombine: TD3DRMCOMBINETYPE;
- rvX, rvY, rvZ: TD3DVALUE): HRESULT; stdcall;
- function AddScale (rctCombine: TD3DRMCOMBINETYPE;
- rvX, rvY, rvZ: TD3DVALUE): HRESULT; stdcall;
- function AddRotation (rctCombine: TD3DRMCOMBINETYPE;
- rvX, rvY, rvZ, rvTheta: TD3DVALUE): HRESULT; stdcall;
- function AddVisual (const D3DRMVisual: IDirect3DRMVisual): HRESULT; stdcall;
- function GetChildren (out Children: IDirect3DRMFrameArray): HRESULT;
- stdcall;
- function GetColor: TD3DCOLOR; stdcall;
- function GetLights (out Lights: IDirect3DRMLightArray): HRESULT; stdcall;
- function GetMaterialMode: TD3DRMMATERIALMODE; stdcall;
- function GetParent (out Parent: IDirect3DRMFrame): HRESULT; stdcall;
- function GetPosition (const Ref: IDirect3DRMFrame;
- var lprvPos: TD3DVECTOR): HRESULT; stdcall;
- function GetRotation (const Ref: IDirect3DRMFrame;
- var lprvAxis: TD3DVECTOR; var lprvTheta: TD3DVALUE): HRESULT; stdcall;
- function GetScene (out Root: IDirect3DRMFrame): HRESULT; stdcall;
- function GetSortMode: TD3DRMSORTMODE; stdcall;
- function GetTexture (out Texture: IDirect3DRMTexture): HRESULT; stdcall;
- function GetTransform (rmMatrix: TD3DRMMATRIX4D): HRESULT; stdcall;
- function GetVelocity (const Ref: IDirect3DRMFrame; var lprvVel: TD3DVECTOR;
- fRotVel: BOOL): HRESULT; stdcall;
- function GetOrientation (const Ref: IDirect3DRMFrame;
- var lprvDir, lprvUp: TD3DVECTOR): HRESULT; stdcall;
- function GetVisuals (out Visuals: IDirect3DRMVisualArray): HRESULT; stdcall;
- function GetTextureTopology (var lpU, lpV: BOOL): HRESULT; stdcall;
- function InverseTransform (var lprvDst, lprvSrc: TD3DVECTOR): HRESULT;
- stdcall;
- function Load (lpvObjSource, lpvObjID: Pointer;
- d3drmLOFlags: TD3DRMLOADOPTIONS;
- d3drmLoadTextureProc: TD3DRMLOADTEXTURECALLBACK;
- lpArgLTP: Pointer): HRESULT; stdcall;
- function LookAt (const Target, Ref: IDirect3DRMFrame;
- rfcConstraint: TD3DRMFRAMECONSTRAINT): HRESULT; stdcall;
- function Move (delta: TD3DVALUE): HRESULT; stdcall;
- function DeleteChild (const Child: IDirect3DRMFrame): HRESULT; stdcall;
- function DeleteLight (const D3DRMLight: IDirect3DRMLight): HRESULT; stdcall;
- function DeleteMoveCallback (d3drmFMC: TD3DRMFRAMEMOVECALLBACK;
- lpArg: Pointer): HRESULT; stdcall;
- function DeleteVisual (const D3DRMVisual: IDirect3DRMVisual): HRESULT;
- stdcall;
- function GetSceneBackground: TD3DCOLOR; stdcall;
- function GetSceneBackgroundDepth (
- out DDSurface: IDirectDrawSurface): HRESULT; stdcall;
- function GetSceneFogColor: TD3DCOLOR; stdcall;
- function GetSceneFogEnable: BOOL; stdcall;
- function GetSceneFogMode: TD3DRMFOGMODE; stdcall;
- function GetSceneFogParams (var lprvStart, lprvEnd,
- lprvDensity: TD3DVALUE): HRESULT; stdcall;
- function SetSceneBackground (rcColor: TD3DCOLOR): HRESULT; stdcall;
- function SetSceneBackgroundRGB (rvRed, rvGreen,
- rvBlue: TD3DVALUE): HRESULT; stdcall;
- function SetSceneBackgroundDepth (
- const Image: IDirectDrawSurface): HRESULT; stdcall;
- function SetSceneBackgroundImage (
- const Texture: IDirect3DRMTexture): HRESULT; stdcall;
- function SetSceneFogEnable (bEnable: BOOL): HRESULT; stdcall;
- function SetSceneFogColor (rcColor: TD3DCOLOR): HRESULT; stdcall;
- function SetSceneFogMode (rfMode: TD3DRMFOGMODE): HRESULT; stdcall;
- function SetSceneFogParams (rvStart, rvEnd, rvDensity: TD3DVALUE): HRESULT;
- stdcall;
- function SetColor (rcColor: TD3DCOLOR): HRESULT; stdcall;
- function SetColorRGB (rvRed, rvGreen, rvBlue: TD3DVALUE): HRESULT; stdcall;
- function GetZbufferMode: TD3DRMZBUFFERMODE; stdcall;
- function SetMaterialMode (rmmMode: TD3DRMMATERIALMODE): HRESULT; stdcall;
- function SetOrientation (const Ref: IDirect3DRMFrame;
- rvDx, rvDy, rvDz, rvUx, rvUy, rvUz: TD3DVALUE): HRESULT; stdcall;
- function SetPosition (const Ref: IDirect3DRMFrame;
- rvX, rvY, rvZ: TD3DVALUE): HRESULT; stdcall;
- function SetRotation (const Ref: IDirect3DRMFrame; rvX, rvY, rvZ,
- rvTheta: TD3DVALUE): HRESULT; stdcall;
- function SetSortMode (d3drmSM: TD3DRMSORTMODE): HRESULT; stdcall;
- function SetTexture (const D3DRMTexture: IDirect3DRMTexture): HRESULT; stdcall;
- function SetTextureTopology (cylU, cylV: BOOL): HRESULT; stdcall;
- function SetVelocity (const Ref: IDirect3DRMFrame; rvX, rvY, rvZ: TD3DVALUE;
- fRotVel: BOOL): HRESULT; stdcall;
- function SetZbufferMode (d3drmZBM: TD3DRMZBUFFERMODE): HRESULT; stdcall;
- function Transform (var lpd3dVDst, lpd3dVSrc: TD3DVECTOR): HRESULT; stdcall;
- end;
-
- IDirect3DRMMesh = interface (IDirect3DRMVisual)
- ['{a3a80d01-6e12-11cf-ac4a-0000c03825a1}']
- function Scale (sx, sy, sz: TD3DVALUE): HRESULT; stdcall;
- function Translate (tx, ty, tz: TD3DVALUE): HRESULT; stdcall;
- function GetBox (var lpD3DRMBox: TD3DRMBOX): HRESULT; stdcall;
- function AddGroup (vCount, fCount, vPerFace: DWORD; var fData: DWORD;
- var returnId: TD3DRMGROUPINDEX): HRESULT; stdcall;
- function SetVertices (id: TD3DRMGROUPINDEX; index, count: DWORD;
- var values: TD3DRMVERTEX): HRESULT; stdcall;
- function SetGroupColor (id: TD3DRMGROUPINDEX; value: TD3DCOLOR): HRESULT;
- stdcall;
- function SetGroupColorRGB (id: TD3DRMGROUPINDEX; red, green,
- blue: TD3DVALUE): HRESULT; stdcall;
- function SetGroupMapping (id: TD3DRMGROUPINDEX;
- value: TD3DRMMAPPING): HRESULT; stdcall;
- function SetGroupQuality (id: TD3DRMGROUPINDEX;
- value: TD3DRMRENDERQUALITY): HRESULT; stdcall;
- function SetGroupMaterial (id: TD3DRMGROUPINDEX;
- const value: IDirect3DRMMaterial): HRESULT; stdcall;
- function SetGroupTexture (id: TD3DRMGROUPINDEX;
- const value: IDirect3DRMTexture): HRESULT; stdcall;
- function GetGroupCount: DWORD; stdcall;
- function GetGroup (id: TD3DRMGROUPINDEX; var vCount, fCount, vPerFace,
- fDataSize, fData: DWORD): HRESULT; stdcall;
- function GetVertices (id: TD3DRMGROUPINDEX; index, count: DWORD;
- returnPtr: PD3DRMVERTEX): HRESULT; stdcall;
- function GetGroupColor (id: TD3DRMGROUPINDEX): TD3DCOLOR; stdcall;
- function GetGroupMapping (id: TD3DRMGROUPINDEX): TD3DRMMAPPING; stdcall;
- function GetGroupQuality (id: TD3DRMGROUPINDEX): TD3DRMRENDERQUALITY; stdcall;
- function GetGroupMaterial (id: TD3DRMGROUPINDEX;
- out returnPtr: IDirect3DRMMaterial): HRESULT; stdcall;
- function GetGroupTexture (id: TD3DRMGROUPINDEX;
- out returnPtr: IDirect3DRMTexture): HRESULT; stdcall;
- end;
-
- IDirect3DRMShadow = interface (IDirect3DRMVisual)
- ['{af359780-6ba3-11cf-ac4a-0000c03825a1}']
- function Init (const D3DRMVisual: IDirect3DRMVisual;
- const D3DRMLight: IDirect3DRMLight;
- px, py, pz, nx, ny, nz: TD3DVALUE): HRESULT; stdcall;
- end;
-
- IDirect3DRMFace = interface (IDirect3DRMObject)
- ['{eb16cb07-d271-11ce-ac48-0000c03825a1}']
- function AddVertex (x, y, z: TD3DVALUE): HRESULT; stdcall;
- function AddVertexAndNormalIndexed (vertex, normal: DWORD): HRESULT; stdcall;
- function SetColorRGB (red, green, blue: TD3DVALUE): HRESULT; stdcall;
- function SetColor (color: TD3DCOLOR): HRESULT; stdcall;
- function SetTexture (const D3DRMTexture: IDirect3DRMTexture): HRESULT;
- stdcall;
- function SetTextureCoordinates (vertex: DWORD; u, v: TD3DVALUE): HRESULT;
- stdcall;
- function SetMaterial (const Mat: IDirect3DRMMaterial): HRESULT; stdcall;
- function SetTextureTopology (cylU, cylV: BOOL): HRESULT; stdcall;
- function GetVertex (index: DWORD; var lpPosition: TD3DVECTOR;
- var lpNormal: TD3DVECTOR): HRESULT; stdcall;
- function GetVertices (var lpdwVertexCount: DWORD;
- var lpPosition, lpNormal: TD3DVECTOR): HRESULT; stdcall;
- function GetTextureCoordinates (index: DWORD;
- var lpU, lpV: TD3DVALUE): HRESULT; stdcall;
- function GetTextureTopology (var lpU, lpV: BOOL): HRESULT; stdcall;
- function GetNormal (var lpNormal: TD3DVECTOR): HRESULT; stdcall;
- function GetTexture (out Texture: IDirect3DRMTexture): HRESULT; stdcall;
- function GetMaterial (const Mat: IDirect3DRMMaterial): HRESULT; stdcall;
- function GetVertexCount: Integer; stdcall;
- function GetVertexIndex (dwIndex: DWORD): Integer; stdcall;
- function GetTextureCoordinateIndex (dwIndex: DWORD): Integer; stdcall;
- function GetColor: TD3DCOLOR; stdcall;
- end;
-
- IDirect3DRMMeshBuilder = interface (IDirect3DRMVisual)
- ['{a3a80d02-6e12-11cf-ac4a-0000c03825a1}']
- function Load (lpvObjSource, lpvObjID: Pointer;
- d3drmLOFlags: TD3DRMLOADOPTIONS;
- d3drmLoadTextureProc: TD3DRMLOADTEXTURECALLBACK;
- lpvArg: Pointer): HRESULT; stdcall;
- function Save (lpFilename: PChar; d3drmXOFFormat: TD3DRMXOFFORMAT;
- d3drmSOContents: TD3DRMSAVEOPTIONS): HRESULT; stdcall;
- function Scale (sx, sy, sz: TD3DVALUE): HRESULT; stdcall;
- function Translate (tx, ty, tz: TD3DVALUE): HRESULT; stdcall;
- function SetColorSource (source: TD3DRMCOLORSOURCE): HRESULT; stdcall;
- function GetBox (var lpD3DRMBox: TD3DRMBOX): HRESULT; stdcall;
- function GenerateNormals: HRESULT; stdcall;
- function GetColorSource: TD3DRMCOLORSOURCE; stdcall;
- function AddMesh (const D3DRMMesh: IDirect3DRMMesh): HRESULT; stdcall;
- function AddMeshBuilder (
- const D3DRMMeshBuild: IDirect3DRMMeshBuilder): HRESULT; stdcall;
- function AddFrame (const D3DRMFrame: IDirect3DRMFrame): HRESULT; stdcall;
- function AddFace (const D3DRMFace: IDirect3DRMFace): HRESULT; stdcall;
- function AddFaces (dwVertexCount: DWORD; lpD3DVertices: Pointer;
- normalCount: DWORD; lpNormals: Pointer; lpFaceData: Pointer;
- out D3DRMFaceArray: IDirect3DRMFaceArray): HRESULT; stdcall;
- function ReserveSpace (vertexCount, normalCount,
- faceCount: DWORD): HRESULT; stdcall;
- function SetColorRGB (red, green, blue: TD3DVALUE): HRESULT; stdcall;
- function SetColor (color: TD3DCOLOR): HRESULT; stdcall;
- function SetTexture (const D3DRMTexture: IDirect3DRMTexture): HRESULT;
- stdcall;
- function SetMaterial (
- const IDirect3DRMmaterial: IDirect3DRMMaterial): HRESULT; stdcall;
- function SetTextureTopology (cylU, cylV: BOOL): HRESULT; stdcall;
- function SetQuality (quality: TD3DRMRENDERQUALITY): HRESULT; stdcall;
- function SetPerspective (perspective: BOOL): HRESULT; stdcall;
- function SetVertex (index: DWORD; x, y, z: TD3DVALUE): HRESULT; stdcall;
- function SetNormal (index: DWORD; x, y, z: TD3DVALUE): HRESULT; stdcall;
- function SetTextureCoordinates (index: DWORD; u, v: TD3DVALUE): HRESULT;
- stdcall;
- function SetVertexColor (index: DWORD; color: TD3DCOLOR): HRESULT; stdcall;
- function SetVertexColorRGB (index: DWORD; red, green,
- blue: TD3DVALUE): HRESULT; stdcall;
- function GetFaces (out D3DRMFaceArray: IDirect3DRMFaceArray): HRESULT;
- stdcall;
- function GetVertices(var VertexCount: DWORD; Vertices: Pointer;
- var NormalsCount: DWORD; Normals: Pointer;
- var FaceDataSize: DWORD; face_data: Pointer): HRESULT; stdcall;
- function AddVertex (x, y, z: TD3DVALUE): Integer; stdcall;
- function AddNormal (x, y, z: TD3DVALUE): Integer; stdcall;
- function CreateFace (out d3drmFace: IDirect3DRMFace): HRESULT; stdcall;
- function GetQuality: TD3DRMRENDERQUALITY; stdcall;
- function GetPerspective: BOOL; stdcall;
- function GetFaceCount: Integer; stdcall;
- function GetVertexCount: Integer; stdcall;
- function GetVertexColor (index: DWORD): TD3DCOLOR; stdcall;
- function CreateMesh (out D3DRMMesh: IDirect3DRMMesh): HRESULT; stdcall;
- end;
-
- IDirect3DRMLight = interface (IDirect3DRMObject)
- ['{eb16cb08-d271-11ce-ac48-0000c03825a1}']
- function SetType (d3drmtType: TD3DRMLIGHTTYPE): HRESULT; stdcall;
- function SetColor (rcColor: TD3DCOLOR): HRESULT; stdcall;
- function SetColorRGB (rvRed, rvGreen, rvBlue: TD3DVALUE): HRESULT; stdcall;
- function SetRange (rvRange: TD3DVALUE): HRESULT; stdcall;
- function SetUmbra (rvAngle: TD3DVALUE): HRESULT; stdcall;
- function SetPenumbra (rvAngle: TD3DVALUE): HRESULT; stdcall;
- function SetConstantAttenuation (rvAtt: TD3DVALUE): HRESULT; stdcall;
- function SetLinearAttenuation (rvAtt: TD3DVALUE): HRESULT; stdcall;
- function SetQuadraticAttenuation (rvAtt: TD3DVALUE): HRESULT; stdcall;
- function GetRange: TD3DVALUE; stdcall;
- function GetUmbra: TD3DVALUE; stdcall;
- function GetPenumbra: TD3DVALUE; stdcall;
- function GetConstantAttenuation: TD3DVALUE; stdcall;
- function GetLinearAttenuation: TD3DVALUE; stdcall;
- function GetQuadraticAttenuation: TD3DVALUE; stdcall;
- function GetColor: TD3DCOLOR; stdcall;
- function GetType: TD3DRMLIGHTTYPE; stdcall;
- function SetEnableFrame (const EnableFrame: IDirect3DRMFrame): HRESULT;
- stdcall;
- function GetEnableFrame (out EnableFrame: IDirect3DRMFrame): HRESULT;
- stdcall;
- end;
-
- IDirect3DRMTexture = interface (IDirect3DRMVisual)
- ['{eb16cb09-d271-11ce-ac48-0000c03825a1}']
- function InitFromFile (Filename: PChar): HRESULT; stdcall;
- function InitFromSurface (const DDS: IDirectDrawSurface): HRESULT; stdcall;
- function InitFromResource (rs: HRSRC): HRESULT; stdcall;
- function Changed (bPixels, bPalette: BOOL): HRESULT; stdcall;
- function SetColors (ulColors: DWORD): HRESULT; stdcall;
- function SetShades (ulShades: DWORD): HRESULT; stdcall;
- function SetDecalSize (rvWidth, rvHeight: TD3DVALUE): HRESULT; stdcall;
- function SetDecalOrigin (lX, lY: LongInt): HRESULT; stdcall;
- function SetDecalScale (dwScale: DWORD): HRESULT; stdcall;
- function SetDecalTransparency (bTransp: BOOL): HRESULT; stdcall;
- function SetDecalTransparentColor (rcTransp: TD3DCOLOR): HRESULT; stdcall;
- function GetDecalSize (var lprvWidth, lprvHeight: TD3DVALUE): HRESULT;
- stdcall;
- function GetDecalOrigin (var lplX, lplY: LongInt): HRESULT; stdcall;
- function GetImage: PD3DRMIMAGE; stdcall;
- function GetShades: DWORD; stdcall;
- function GetColors: DWORD; stdcall;
- function GetDecalScale: DWORD; stdcall;
- function GetDecalTransparency: BOOL; stdcall;
- function GetDecalTransparentColor: TD3DCOLOR; stdcall;
- end;
-
- IDirect3DRMWrap = interface (IDirect3DRMObject)
- ['{eb16cb0a-d271-11ce-ac48-0000c03825a1}']
- function Init (d3drmwt: TD3DRMWRAPTYPE; const d3drmfRef: IDirect3DRMFrame;
- ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DVALUE): HRESULT;
- stdcall;
- function Apply (const Obj: IDirect3DRMObject): HRESULT; stdcall;
- function ApplyRelative (const frame: IDirect3DRMFrame;
- const mesh: IDirect3DRMObject): HRESULT; stdcall;
- end;
-
- IDirect3DRMMaterial = interface (IDirect3DRMObject)
- ['{eb16cb0b-d271-11ce-ac48-0000c03825a1}']
- function SetPower (rvPower: TD3DVALUE): HRESULT; stdcall;
- function SetSpecular (r, g, b: TD3DVALUE): HRESULT; stdcall;
- function SetEmissive (r, g, b: TD3DVALUE): HRESULT; stdcall;
- function GetPower: TD3DVALUE; stdcall;
- function GetSpecular (var lpr, lpg, lpb: TD3DVALUE): HRESULT; stdcall;
- function GetEmissive (var lpr, lpg, lpb: TD3DVALUE): HRESULT; stdcall;
- end;
-
- IDirect3DRMAnimation = interface (IDirect3DRMObject)
- ['{eb16cb0d-d271-11ce-ac48-0000c03825a1}']
- function SetOptions (d3drmanimFlags: TD3DRMANIMATIONOPTIONS): HRESULT;
- stdcall;
- function AddRotateKey (rvTime: TD3DVALUE;
- var rqQuat: TD3DRMQUATERNION): HRESULT; stdcall;
- function AddPositionKey (rvTime, rvX, rvY, rvZ: TD3DVALUE): HRESULT;
- stdcall;
- function AddScaleKey (time, x, y, z: TD3DVALUE): HRESULT; stdcall;
- function DeleteKey (time: TD3DVALUE): HRESULT; stdcall;
- function SetFrame (const D3DRMFrame: IDirect3DRMFrame): HRESULT; stdcall;
- function SetTime (rvTime: TD3DVALUE): HRESULT; stdcall;
- function GetOptions: TD3DRMANIMATIONOPTIONS; stdcall;
- end;
-
- IDirect3DRMAnimationSet = interface (IDirect3DRMObject)
- ['{eb16cb0e-d271-11ce-ac48-0000c03825a1}']
- function AddAnimation (const D3DRMAnimation: IDirect3DRMAnimation): HRESULT;
- stdcall;
- function Load (lpvObjSource, lpvObjID: Pointer;
- d3drmLOFlags: TD3DRMLOADOPTIONS;
- d3drmLoadTextureProc: TD3DRMLOADTEXTURECALLBACK; lpArgLTP: Pointer;
- lpParentFrame: IDirect3DRMFrame): HRESULT; stdcall;
- function DeleteAnimation (
- const D3DRMAnimation: IDirect3DRMAnimation): HRESULT; stdcall;
- function SetTime (rvTime: TD3DVALUE): HRESULT; stdcall;
-
- end;
-
- IDirect3DRMUserVisual = interface (IDirect3DRMVisual)
- ['{59163de0-6d43-11cf-ac4a-0000c03825a1}']
- function Init (d3drmUVProc: TD3DRMUSERVISUALCALLBACK;
- lpArg: Pointer): HRESULT; stdcall;
- end;
-
- IDirect3DRMArray = interface (IUnknown)
- function GetSize: DWORD; stdcall;
- end;
-
- IDirect3DRMDeviceArray = interface (IDirect3DRMArray)
- ['{eb16cb10-d271-11ce-ac48-0000c03825a1}']
- function GetElement (index: DWORD;
- out D3DRMDevice: IDirect3DRMDevice): HRESULT; stdcall;
- end;
-
- IDirect3DRMFrameArray = interface (IDirect3DRMArray)
- ['{eb16cb12-d271-11ce-ac48-0000c03825a1}']
- function GetElement (index: DWORD;
- out D3DRMFrame: IDirect3DRMFrame): HRESULT; stdcall;
- end;
-
- IDirect3DRMViewportArray = interface (IDirect3DRMArray)
- ['{eb16cb11-d271-11ce-ac48-0000c03825a1}']
- function GetElement (index: DWORD;
- out D3DRMViewport: IDirect3DRMViewport): HRESULT; stdcall;
- end;
-
- IDirect3DRMVisualArray = interface (IDirect3DRMArray)
- ['{eb16cb13-d271-11ce-ac48-0000c03825a1}']
- function GetElement (index: DWORD;
- out D3DRMVisual: IDirect3DRMVisual): HRESULT; stdcall;
- end;
-
- IDirect3DRMPickedArray = interface (IDirect3DRMArray)
- function GetPick (index: DWORD; out Visual: IDirect3DRMVisual;
- out FrameArray: IDirect3DRMFrameArray;
- var lpD3DRMPickDesc: TD3DRMPICKDESC): HRESULT; stdcall;
- end;
-
- IDirect3DRMLightArray = interface (IDirect3DRMArray)
- ['{eb16cb14-d271-11ce-ac48-0000c03825a1}']
- function GetElement (index: DWORD;
- out D3DRMLight: IDirect3DRMLight): HRESULT; stdcall;
- end;
-
- IDirect3DRMFaceArray = interface (IDirect3DRMArray)
- ['{eb16cb17-d271-11ce-ac48-0000c03825a1}']
- function GetElement (index: DWORD;
- out D3DRMFace: IDirect3DRMFace): HRESULT; stdcall;
- end;
-
-
- { Direct3D Retained Mode interface }
- { from d3drm.h }
-
- type
- TD3DRMDEVICEPALETTECALLBACK = procedure(lpDirect3DRMDev: IDirect3DRMDevice;
- lpArg: Pointer; dwIndex: DWORD; red, green, blue: LongInt); stdcall;
-
- type
- IDirect3DRM = interface(IUnknown)
- ['{2bc49361-8327-11cf-ac4a-0000c03825a1}']
- function CreateObject(const clsid: TGUID; const pUnkOuter: IUnknown;
- const riid: TGUID; out ppv: IUnknown): HRESULT; stdcall;
- function CreateFrame(const InFrame: IDirect3DRMFrame;
- out OutFrame: IDirect3DRMFrame): HRESULT; stdcall;
- function CreateMesh(out D3DRMMesh: IDirect3DRMMesh): HRESULT; stdcall;
- function CreateMeshBuilder(
- out D3DRMMeshBuilder: IDirect3DRMMeshBuilder): HRESULT; stdcall;
- function CreateFace(
- out D3drmFace: IDirect3DRMFace): HRESULT; stdcall;
- function CreateAnimation(
- out D3DRMAnimation: IDirect3DRMAnimation): HRESULT; stdcall;
- function CreateAnimationSet(
- out D3DRMAnimationSet: IDirect3DRMAnimationSet): HRESULT; stdcall;
- function CreateTexture(const lpImage: TD3DRMIMAGE;
- out D3DRMTexture: IDirect3DRMTexture): HRESULT; stdcall;
- function CreateLight(d3drmltLightType: TD3DRMLIGHTTYPE;
- cColor: TD3DCOLOR; out D3DRMLight: IDirect3DRMLight): HRESULT;
- stdcall;
- function CreateLightRGB(ltLightType: TD3DRMLIGHTTYPE;
- vRed, vGreen, vBlue: TD3DVALUE;
- out D3DRMLight: IDirect3DRMLight): HRESULT; stdcall;
- function CreateMaterial(vPower: TD3DVALUE;
- out D3DRMMaterial: IDirect3DRMMaterial): HRESULT; stdcall;
- function CreateDevice(dwWidth, dwHeight: DWORD;
- out D3DRMDevice: IDirect3DRMDevice): HRESULT; stdcall;
- (* Create a Windows Device using DirectDraw surfaces *)
- function CreateDeviceFromSurface(const GUID: TGUID; const DD: IDirectDraw;
- const DDSBack: IDirectDrawSurface;
- out D3DRMDevice: IDirect3DRMDevice): HRESULT; stdcall;
- (* Create a Windows Device using D3D objects *)
- function CreateDeviceFromD3D(const D3D: IDirect3D;
- const D3DDev: IDirect3DDevice;
- out D3DRMDevice: IDirect3DRMDevice): HRESULT; stdcall;
- function CreateDeviceFromClipper(const DDClipper: IDirectDrawClipper;
- const GUID: PGUID; width, height: Integer;
- out D3DRMDevice: IDirect3DRMDevice): HRESULT; stdcall;
- function CreateTextureFromSurface(const DDS: IDirectDrawSurface;
- out D3DRMTexture: IDirect3DRMTexture): HRESULT; stdcall;
- function CreateShadow(const Visual: IDirect3DRMVisual;
- const Light: IDirect3DRMLight; px, py, pz, nx, ny, nz: TD3DVALUE;
- out Shadow: IDirect3DRMVisual): HRESULT; stdcall;
- function CreateViewport(const Dev: IDirect3DRMDevice;
- const Camera: IDirect3DRMFrame;
- dwXPos, dwYPos, dwWidth, dwHeight: DWORD;
- out D3DRMViewport: IDirect3DRMViewport): HRESULT; stdcall;
- function CreateWrap(wraptype: TD3DRMWRAPTYPE; const Ref: IDirect3DRMFrame;
- ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DVALUE;
- out D3DRMWrap: IDirect3DRMWrap): HRESULT; stdcall;
- function CreateUserVisual(fn: TD3DRMUSERVISUALCALLBACK; lpArg: Pointer;
- out D3DRMUV: IDirect3DRMUserVisual): HRESULT; stdcall;
- function LoadTexture(FileName: PChar;
- out D3DRMTexture: IDirect3DRMTexture): HRESULT; stdcall;
- function LoadTextureFromResource(rs: HRSRC;
- out D3DRMTexture: IDirect3DRMTexture): HRESULT; stdcall;
- function SetSearchPath(Path: PChar): HRESULT; stdcall;
- function AddSearchPath(Path: PChar): HRESULT; stdcall;
- function GetSearchPath(var lpdwSize: DWORD; lpszPath: PChar): HRESULT;
- stdcall;
- function SetDefaultTextureColors(dwColors: DWORD): HRESULT; stdcall;
- function SetDefaultTextureShades(dwShades: DWORD): HRESULT; stdcall;
- function GetDevices(out DevArray: IDirect3DRMDeviceArray): HRESULT;
- stdcall;
- function GetNamedObject(Name: PChar;
- out D3DRMObject: IDirect3DRMObject): HRESULT; stdcall;
- function EnumerateObjects(func: TD3DRMOBJECTCALLBACK;
- lpArg: Pointer): HRESULT; stdcall;
- function Load(lpvObjSource, lpvObjID, lplpGUIDs: Pointer;
- dwcGUIDs: DWORD; d3drmLOFlags: TD3DRMLOADOPTIONS;
- d3drmLoadProc: TD3DRMLOADCALLBACK; lpArgLP: Pointer;
- d3drmLoadTextureProc: TD3DRMLOADTEXTURECALLBACK; lpArgLTP: Pointer;
- const ParentFrame: IDirect3DRMFrame): HRESULT; stdcall;
- function Tick(d3dvalTick: TD3DVALUE): HRESULT; stdcall;
- end;
-
- const
- D3DRM_OK = DD_OK;
- D3DRMERR_BADOBJECT = $88760000 + 781;
- D3DRMERR_BADTYPE = $88760000 + 782;
- D3DRMERR_BADALLOC = $88760000 + 783;
- D3DRMERR_FACEUSED = $88760000 + 784;
- D3DRMERR_NOTFOUND = $88760000 + 785;
- D3DRMERR_NOTDONEYET = $88760000 + 786;
- D3DRMERR_FILENOTFOUND = $88760000 + 787;
- D3DRMERR_BADFILE = $88760000 + 788;
- D3DRMERR_BADDEVICE = $88760000 + 789;
- D3DRMERR_BADVALUE = $88760000 + 790;
- D3DRMERR_BADMAJORVERSION = $88760000 + 791;
- D3DRMERR_BADMINORVERSION = $88760000 + 792;
- D3DRMERR_UNABLETOEXECUTE = $88760000 + 793;
-
- (* Create a Direct3DRM API *)
- function Direct3DRMCreate(out Direct3DRM: IDirect3DRM): HRESULT; stdcall;
-
-
- { from d3drmwin.h }
-
- type
- IDirect3DRMWinDevice = interface ( IDirect3DRMObject )
- ['{c5016cc0-d273-11ce-ac48-0000c03825a1}']
- function HandlePaint ( hDC: HDC ): HRESULT ; stdcall ;
- function HandleActivate ( wparam: WORD ): HRESULT ; stdcall ;
- end ;
-
-
- {------------- Direct Sound -------------------}
- type
- IDirectSound = interface;
- IDirectSoundBuffer = interface;
- IDirectSound3DListener = interface;
- IDirectSound3DBuffer = interface;
-
- TDSCAPS = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwMinSecondarySampleRate: DWORD;
- dwMaxSecondarySampleRate: DWORD;
- dwPrimaryBuffers: DWORD;
- dwMaxHwMixingAllBuffers: DWORD;
- dwMaxHwMixingStaticBuffers: DWORD;
- dwMaxHwMixingStreamingBuffers: DWORD;
- dwFreeHwMixingAllBuffers: DWORD;
- dwFreeHwMixingStaticBuffers: DWORD;
- dwFreeHwMixingStreamingBuffers: DWORD;
- dwMaxHw3DAllBuffers: DWORD;
- dwMaxHw3DStaticBuffers: DWORD;
- dwMaxHw3DStreamingBuffers: DWORD;
- dwFreeHw3DAllBuffers: DWORD;
- dwFreeHw3DStaticBuffers: DWORD;
- dwFreeHw3DStreamingBuffers: DWORD;
- dwTotalHwMemBytes: DWORD;
- dwFreeHwMemBytes: DWORD;
- dwMaxContigFreeHwMemBytes: DWORD;
- dwUnlockTransferRateHwBuffers: DWORD;
- dwPlayCpuOverheadSwBuffers: DWORD;
- dwReserved1: DWORD;
- dwReserved2: DWORD;
- end;
- PDSCAPS = ^TDSCAPS;
-
- TDSBCAPS = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwBufferBytes: DWORD;
- dwUnlockTransferRate: DWORD;
- dwPlayCpuOverhead: DWORD;
- end;
- PDSBCAPS = ^TDSBCAPS;
-
- TDSBUFFERDESC = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwBufferBytes: DWORD;
- dwReserved: DWORD;
- lpwfxFormat: PWaveFormatEx;
- end;
- PDSBUFFERDESC = ^TDSBUFFERDESC;
-
- TDS3DBUFFER = packed record
- dwSize: DWORD;
- vPosition: TD3DVECTOR;
- vVelocity: TD3DVECTOR;
- dwInsideConeAngle: DWORD;
- dwOutsideConeAngle: DWORD;
- vConeOrientation: TD3DVECTOR;
- lConeOutsideVolume: longint;
- flMinDistance: TD3DVALUE;
- flMaxDistance: TD3DVALUE;
- dwMode: DWORD;
- end;
- PDS3DBUFFER = ^TDS3DBUFFER;
-
- TDS3DLISTENER = packed record
- dwSize: DWORD;
- vPosition: TD3DVECTOR;
- vVelocity: TD3DVECTOR;
- vOrientFront: TD3DVECTOR;
- vOrientTop: TD3DVECTOR;
- flDistanceFactor: TD3DVALUE;
- flRolloffFactor: TD3DVALUE;
- flDopplerFactor: TD3DVALUE;
- end;
- PDS3DLISTENER = ^TDS3DLISTENER;
-
- //
- // IDirectSound
- //
-
- IDirectSound = interface (IUnknown)
- ['{279AFA83-4981-11CE-A521-0020AF0BE560}']
- function CreateSoundBuffer (const lpDSBufferDesc: TDSBUFFERDESC;
- out lplpDirectSoundBuffer: IDirectSoundBuffer;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- function GetCaps (var lpDSCaps: TDSCAPS): HRESULT; stdcall;
- function DuplicateSoundBuffer (const lpDsbOriginal: IDirectSoundBuffer;
- out lplpDsbDuplicate: IDirectSoundBuffer): HRESULT; stdcall;
- function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
- function Compact: HRESULT; stdcall;
- function GetSpeakerConfig (var lpdwSpeakerConfig: DWORD): HRESULT; stdcall;
- function SetSpeakerConfig (dwSpeakerConfig: DWORD): HRESULT; stdcall;
- function Initialize (const IID: TGUID): HRESULT; stdcall;
- end;
-
- //
- // IDirectSoundBuffer
- //
-
- IDirectSoundBuffer = interface (IUnknown)
- ['{279AFA85-4981-11CE-A521-0020AF0BE560}']
- function GetCaps (var lpDSBufferCaps: TDSBCAPS): HRESULT; stdcall;
- function GetCurrentPosition (var dwCurrentPlayCursor: DWORD;
- var lpdwCurrentWriteCursor: DWORD): HRESULT; stdcall;
- function GetFormat (var lpwfxFormat: TWaveFormatEx;
- dwSizeAllocated: DWORD; var lpdwSizeWritten: DWORD): HRESULT; stdcall;
- function GetVolume (var lplVolume: LongInt): HRESULT; stdcall;
- function GetPan (var lplPan: LongInt): HRESULT; stdcall;
- function GetFrequency (var lpdwFrequency: DWORD): HRESULT; stdcall;
- function GetStatus (var lpdwStatus: DWORD): HRESULT; stdcall;
- function Initialize (const lpDirectSound: IDirectSound;
- const lpDSBufferDesc: TDSBUFFERDESC ): HRESULT; stdcall;
- function Lock (dwWriteCursor: DWORD; dwWriteBytes: DWORD;
- var lplpvAudioPtr1: Pointer; var lpdwAudioBytes1: DWORD;
- var lplpvAudioPtr2: Pointer; var lpdwAudioBytes2: DWORD;
- dwFlags: DWORD): HRESULT; stdcall;
- function Play (dwReserved1, dwReserved2, dwFlags: DWORD): HRESULT; stdcall;
- function SetCurrentPosition (dwNewPosition: DWORD): HRESULT; stdcall;
- function SetFormat (const lpfxFormat: TWaveFormatEx): HRESULT; stdcall;
- function SetVolume (lVolume: LongInt): HRESULT; stdcall;
- function SetPan (lPan: LongInt): HRESULT; stdcall;
- function SetFrequency (dwFrequency: DWORD): HRESULT; stdcall;
- function Stop: HRESULT; stdcall;
- function Unlock (lpvAudioPtr1: Pointer; dwAudioBytes1: DWORD;
- lpvAudioPtr2: Pointer; dwAudioBytes2: DWORD): HRESULT; stdcall;
- function Restore: HRESULT; stdcall;
- end;
-
- //
- // IDirectSound3DListener
- //
-
- IDirectSound3DListener = interface (IUnknown)
- ['{279AFA84-4981-11CE-A521-0020AF0BE560}']
- function GetAllParameters (var lpListener: TDS3DLISTENER): HRESULT; stdcall;
- function GetDistanceFactor (var lpflDistanceFactor: TD3DVALUE): HRESULT; stdcall;
- function GetDopplerFactor (var lpflDopplerFactor: TD3DVALUE): HRESULT; stdcall;
- function GetOrientation (var lpvOrientFront: TD3DVECTOR;
- var lpvOrientTop: TD3DVECTOR): HRESULT; stdcall;
- function GetPosition (var lpvPosition: TD3DVECTOR): HRESULT; stdcall;
- function GetRolloffFactor (var lpflRolloffFactor: TD3DVALUE): HRESULT; stdcall;
- function GetVelocity (var lpvVelocity: TD3DVECTOR): HRESULT; stdcall;
- function SetAllParameters (const lpListener: TDS3DLISTENER;
- dwApply: DWORD): HRESULT; stdcall;
- function SetDistanceFactor (flDistanceFactor: TD3DVALUE;
- dwApply: DWORD): HRESULT; stdcall;
- function SetDopplerFactor (flDopplerFactor: TD3DVALUE;
- dwApply: DWORD): HRESULT; stdcall;
- function SetOrientation (xFront, yFront, zFront, xTop, yTop, zTop: TD3DVALUE;
- dwApply: DWORD): HRESULT; stdcall;
- function SetPosition (x, y, z: TD3DVALUE; dwApply: DWORD): HRESULT; stdcall;
- function SetRolloffFactor (flRolloffFactor: TD3DVALUE;
- dwApply: DWORD): HRESULT; stdcall;
- function SetVelocity (x, y, z: TD3DVALUE; dwApply: DWORD): HRESULT; stdcall;
- function CommitDeferredSettings: HRESULT; stdcall;
- end;
-
- //
- // IDirectSound3DBuffer
- //
-
- IDirectSound3DBuffer = interface (IUnknown)
- ['{279AFA86-4981-11CE-A521-0020AF0BE560}']
- function GetAllParameters (var lpDs3dBuffer: TDS3DBUFFER): HRESULT; stdcall;
- function GetConeAngles (var lpdwInsideConeAngle: DWORD;
- var lpdwOutsideConeAngle: DWORD): HRESULT; stdcall;
- function GetConeOrientation (var lpvOrientation: TD3DVECTOR): HRESULT; stdcall;
- function GetConeOutsideVolume (var lplConeOutsideVolume: longint): HRESULT; stdcall;
- function GetMaxDistance (var lpflMaxDistance: TD3DVALUE): HRESULT; stdcall;
- function GetMinDistance (var lpflMinDistance: TD3DVALUE): HRESULT; stdcall;
- function GetMode (var lpdwMode: DWORD): HRESULT; stdcall;
- function GetPosition (var lpvPosition: TD3DVECTOR): HRESULT; stdcall;
- function GetVelocity (var lpvVelocity: TD3DVECTOR): HRESULT; stdcall;
- function SetAllParameters (const lpDs3dBuffer: TDS3DBUFFER;
- dwApply: DWORD): HRESULT; stdcall;
- function SetConeAngles (dwInsideConeAngle, dwOutsideConeAngle,
- dwApply: DWORD): HRESULT; stdcall;
- function SetConeOrientation (x, y, z: TD3DVALUE;
- dwApply: DWORD): HRESULT; stdcall;
- function SetConeOutsideVolume (lConeOutsideVolume: longint;
- dwApply: DWORD): HRESULT; stdcall;
- function SetMaxDistance (flMaxDistance: TD3DVALUE;
- dwApply: DWORD): HRESULT; stdcall;
- function SetMinDistance (flMinDistance: TD3DVALUE;
- dwApply: DWORD): HRESULT; stdcall;
- function SetMode (dwMode: DWORD; dwApply: DWORD): HRESULT; stdcall;
- function SetPosition (x, y, z: TD3DVALUE; dwApply: DWORD): HRESULT; stdcall;
- function SetVelocity (x, y, z: TD3DVALUE; dwApply: DWORD): HRESULT; stdcall;
- end;
-
- (*
- * Return Codes
- *)
-
- const
- DS_OK = 0;
-
- (*
- * The call failed because resources (such as a priority level)
- * were already being used by another caller.
- *)
- DSERR_ALLOCATED = $88780000 + 10;
- (*
- * The control (vol,pan,etc.) requested by the caller is not available.
- *)
- DSERR_CONTROLUNAVAIL = $88780000 + 30;
- (*
- * An invalid parameter was passed to the returning function
- *)
- DSERR_INVALIDPARAM = E_INVALIDARG;
- (*
- * This call is not valid for the current state of this object
- *)
- DSERR_INVALIDCALL = $88780000 + 50;
- (*
- * An undetermined error occured inside the DSound subsystem
- *)
- DSERR_GENERIC = E_FAIL;
- (*
- * The caller does not have the priority level required for the function to
- * succeed.
- *)
- DSERR_PRIOLEVELNEEDED = $88780000 + 70;
- (*
- * The DSound subsystem couldn't allocate sufficient memory to complete the
- * caller's request.
- *)
- DSERR_OUTOFMEMORY = E_OUTOFMEMORY;
- (*
- * The specified WAVE format is not supported
- *)
- DSERR_BADFORMAT = $88780000 + 100;
- (*
- * The function called is not supported at this time
- *)
- DSERR_UNSUPPORTED = E_NOTIMPL;
- (*
- * No sound driver is available for use
- *)
- DSERR_NODRIVER = $88780000 + 120;
- (*
- * This object is already initialized
- *)
- DSERR_ALREADYINITIALIZED = $88780000 + 130;
- (*
- * This object does not support aggregation
- *)
- DSERR_NOAGGREGATION = CLASS_E_NOAGGREGATION;
- (*
- * The buffer memory has been lost, and must be Restored.
- *)
- DSERR_BUFFERLOST = $88780000 + 150;
- (*
- * Another app has a higher priority level, preventing this call from
- * succeeding.
- *)
- DSERR_OTHERAPPHASPRIO = $88780000 + 160;
- (*
- * The Initialize() member on the Direct Sound Object has not been
- * called or called successfully before calls to other members.
- *)
- DSERR_UNINITIALIZED = $88780000 + 170;
-
- //==========================================================================;
- //
- // Flags...
- //
- //==========================================================================;
-
- DSCAPS_PRIMARYMONO = $00000001;
- DSCAPS_PRIMARYSTEREO = $00000002;
- DSCAPS_PRIMARY8BIT = $00000004;
- DSCAPS_PRIMARY16BIT = $00000008;
- DSCAPS_CONTINUOUSRATE = $00000010;
- DSCAPS_EMULDRIVER = $00000020;
- DSCAPS_CERTIFIED = $00000040;
- DSCAPS_SECONDARYMONO = $00000100;
- DSCAPS_SECONDARYSTEREO = $00000200;
- DSCAPS_SECONDARY8BIT = $00000400;
- DSCAPS_SECONDARY16BIT = $00000800;
-
- DSBPLAY_LOOPING = $00000001;
-
- DSBSTATUS_PLAYING = $00000001;
- DSBSTATUS_BUFFERLOST = $00000002;
- DSBSTATUS_LOOPING = $00000004;
-
- DSBLOCK_FROMWRITECURSOR = $00000001;
-
- DSSCL_NORMAL = 1;
- DSSCL_PRIORITY = 2;
- DSSCL_EXCLUSIVE = 3;
- DSSCL_WRITEPRIMARY = 4;
-
- // flags for IDirectSound3DBuffer::SetMode
- DS3DMODE_NORMAL = 0; // default must be 0
- DS3DMODE_HEADRELATIVE = 1;
- DS3DMODE_DISABLE = 2;
-
- // flags for dwApply parameter of some 3D functions
- DS3D_IMMEDIATE = 0;
- DS3D_DEFERRED = 1;
-
- // default values for 3d factors
- DS3D_DEFAULTDISTANCEFACTOR = 1.0;
- DS3D_DEFAULTROLLOFFFACTOR = 1.0;
- DS3D_DEFAULTDOPPLERFACTOR = 1.0;
-
- DSBCAPS_PRIMARYBUFFER = $00000001;
- DSBCAPS_STATIC = $00000002;
- DSBCAPS_LOCHARDWARE = $00000004;
- DSBCAPS_LOCSOFTWARE = $00000008;
- DSBCAPS_CTRL3D = $00000010;
- DSBCAPS_CTRLFREQUENCY = $00000020;
- DSBCAPS_CTRLPAN = $00000040;
- DSBCAPS_CTRLVOLUME = $00000080;
- DSBCAPS_CTRLDEFAULT = $000000E0; // Pan + volume + frequency.
- DSBCAPS_CTRLALL = $000000F0; // All control capabilities
- DSBCAPS_STICKYFOCUS = $00004000;
- DSBCAPS_GLOBALFOCUS = $00008000;
- DSBCAPS_GETCURRENTPOSITION2 = $00010000; // More accurate play cursor under emulation
-
- DSSPEAKER_HEADPHONE = 1;
- DSSPEAKER_MONO = 2;
- DSSPEAKER_QUAD = 3;
- DSSPEAKER_STEREO = 4;
- DSSPEAKER_SURROUND = 5;
-
- type
- TDSENUMCALLBACK = function (const lpGuid: TGUID; Description, Module: PChar;
- lpContext: Pointer): BOOL; stdcall;
-
- function DirectSoundCreate (SoundDevice: PGUID; out DS: IDirectSound;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- function DirectSoundEnumerate (Callback: TDSENUMCALLBACK;
- lpContext: Pointer): HRESULT; stdcall;
-
- const
- D3DRM = 'D3DRM.DLL';
-
- implementation
-
- function DirectDrawEnumerate; external 'DDRAW.DLL' name 'DirectDrawEnumerateA';
- function DirectDrawCreate; external 'DDRAW.DLL';
- function DirectDrawCreateClipper; external 'DDRAW.DLL';
- function NtDirectDrawCreate; external 'DDRAW.DLL';
-
- function DirectPlayEnumerate; external 'DPLAYX.DLL' name 'DirectPlayEnumerateA';
- function DirectPlayCreate; external 'DPLAYX.DLL';
-
- function DirectSoundEnumerate; external 'DSOUND.DLL' name 'DirectSoundEnumerateA';
- function DirectSoundCreate; external 'DSOUND.DLL';
-
- function Direct3DRMCreate; external D3DRM;
- function D3DRMCreateColorRGB ; external D3DRM;
- function D3DRMCreateColorRGBA ; external D3DRM;
- function D3DRMColorGetRed ; external D3DRM;
- function D3DRMColorGetGreen ; external D3DRM;
- function D3DRMColorGetBlue ; external D3DRM;
- function D3DRMColorGetAlpha ; external D3DRM;
- function D3DRMVectorAdd ; external D3DRM;
- function D3DRMVectorSubtract ; external D3DRM;
- function D3DRMVectorReflect ; external D3DRM;
- function D3DRMVectorCrossProduct ; external D3DRM;
- function D3DRMVectorDotProduct ; external D3DRM;
- function D3DRMVectorNormalize ; external D3DRM;
- function D3DRMVectorNormalise ; external D3DRM name 'D3DRMVectorNormalize' ;
- function D3DRMVectorModulus ; external D3DRM;
- function D3DRMVectorRotate ; external D3DRM;
- function D3DRMVectorScale ; external D3DRM;
- function D3DRMVectorRandom ; external D3DRM;
- function D3DRMQuaternionFromRotation ; external D3DRM;
- function D3DRMQuaternionMultiply ; external D3DRM;
- function D3DRMQuaternionSlerp ; external D3DRM;
- procedure D3DRMMatrixFromQuaternion ; external D3DRM;
-
- end.
-
-